如何在ZedGraph中同步三个GraphPane? [英] How to sync three GraphPane's in ZedGraph?

查看:580
本文介绍了如何在ZedGraph中同步三个GraphPane?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 ZedGraph 以显示作为第一图片所示的三个GraphPane的六个图形,所有的图是同步的。然而,当我尝试显示第一个窗格中的图形不同步如图所示第二张图的日期。其重要的是,所有六个图形保持同步,为用户使整个图表的感

While using ZedGraph to display six graphs on three GraphPane's as shown in first pic, all graphs are in sync. However when i try to display the date for the first pane the graph are out of sync as shown in the second pic. Its important that all six graphs remain in sync for the user to make sense of the whole chart.

我试图XAxis.Type = AxisType.Date如通过<建议HREF =http://stackoverflow.com/users/1828137/tmwoods> tmwoods 的这里,并能显示沿X轴的日期。沿X轴的日期时间可以在分/秒,从上午9:00到下午4:00说,也可能是在几天说的形式为28/1/2009 25/11/2012

I have tried XAxis.Type = AxisType.Date as suggested by tmwoods here and was able to show the dates along X axis. The DateTime along X axis can be in minutes/seconds say from 9:00 AM to 4:00 PM could also be in days say form 28/1/2009 to 25/11/2012

< IMG SRC =http://i.stack.imgur.com/QXsxF.pngALT =图片2>

推荐答案

OK,我想我得到了它。尝试添加给你的代码:

OK, I think I got it. Try adding this to your code:

pane1.Chart.Rect = new RectangleF (pane2.Chart.Rect.X,
            pane2.Chart.Rect.Y,
            pane2.Chart.Rect.Width,
            pane2.Chart.Rect.Height);



我一直在偷看周围, Zedgraph 支持一种叫做走势对齐,但我不能找到它的源的任何地方。我发现的最接近的是这里;检查出的最底端的例子。它描述了如何使varyng的多个图表垂直尺寸。但是,我还没有测试出来。

I've been peeking around and Zedgraph supports something called Graph Align but I can't find source on it anywhere. The closest I have found is here; check out the bottom-most example. It describes how to align multiple charts of varyng sizing vertically. But I haven't tested it out.

这篇关于如何在ZedGraph中同步三个GraphPane?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆