zedgraph

zedgraph, how to convert XAxis.Scale.Min to a date

自作多情 提交于 2019-12-12 03:06:05
问题 I use zedgraph to draw figures in my vb.net project. The x axis of figure is date . I have two text boxes showing the minimum and maximum values of x axis in date. The following code shows how to get x axis values when a figure is zoomed by using isEnableWheelZoom property, also see this link zedgraph EnableWheelZoom, how to get axis values after zooming?. But I found that I only get axis value, e.g. 4508.345, but NOT the date that I want. Actually on figure, it shows date correctly. My

zedgraph EnableWheelZoom, how to get axis values after zooming?

自古美人都是妖i 提交于 2019-12-11 22:08:55
问题 In my vb.net project, I use zedgraph to draw figures. I find that the following properties work well to zoom figure on the center of mouse. Friend WithEvents gcMain As ZedGraph.ZedGraphControl Me.gcMain.IsZoomOnMouseCenter = True Me.gcMain.IsEnableWheelZoom = True I have two toolstrip text boxes to show the minimum and maximum values of x axis. When I change values in text boxes, the x axis changes. The following code shows an example of handling the textbox. However I do not know how to

ZedGraph curve with multiple segments

梦想的初衷 提交于 2019-12-11 12:06:55
问题 Is it possible to draw a curve which consists of multiple segments? For example, I have 4 points and I need to plot curve with segments from point1 to point2 and from point3 to point4 , with no connection between point2 and point3 . How can I do this? 回答1: One idea that comes to mind is to plot two different curves. 1) Create two ZedGraph.PointPairList items, one with Point1 and Point2 and the other with Point3 and Point4. 2) Use ZedGraph.GraphPane.AddCurve to add two curves, using the

Drawing line on a click on ZedGraph Pane

雨燕双飞 提交于 2019-12-11 11:13:08
问题 I have a bit different kind of requirement for ZedGraph. I want to create the curves on the ZedGraph pane when user clicks on the ZedGraph pane. Also, I have other graphs plotted on that pane. But i want that whenever user clicks on the zedGraph area, we get the co-ordinates where user have clicked and i draw a straigth line on that clicked co-ordinate. I have used the MouseCLick event alogn with the FindNearestObject method like the following way: private void zedGraph_RenderedTrack

Working with zedgraph XDate values to set Major|MinorStep and BaseTic values for x-axis

眉间皱痕 提交于 2019-12-11 08:18:31
问题 I am trying to control the value labels for my zedgraph's x-axis. Before, the labels would "fly around" and not really stay put on the axis. They might move left or right on the axis and pop in and out of existence based on the data. Like in the picture below I first tried to draw the labels myself when I finally found good documentation for the zedgraph library. There I found the [AXIS].Scale options of MajorStep MinorStep and BaseTic . Which if set correctly should cause the labels to stay

Format DateAsOrdinal xAxis labels in ZedGraph

吃可爱长大的小学妹 提交于 2019-12-11 04:02:21
问题 I have now changed my x axis to DateAsOrdinal , but I would like to improve the label format. I currently handle the XAxis.ScaleFormatEvent like this: Private Function OnXScaleFormatEvent(ByVal pane As GraphPane, ByVal axis As Axis, ByVal val As Double, ByVal index As Integer) As String Dim result As String = "" If val < priceBars.Count Then Dim time As Date = Date.FromOADate(priceBars(val).X) result = [String].Format("{0:D2}{1}{2:D2}", time.Hour, ":", time.Minute) End If Return result End

How to sync three GraphPane's in ZedGraph?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 02:22:53
问题 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. 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

Multiple XAxis with ZedGraph

喜你入骨 提交于 2019-12-10 22:49:08
问题 With ZedGraph, I can add multiple YAxis by doing the following: YAxis yAxis3 = new YAxis("Distance, m"); pane.YAxisList.Add(yAxis3); Is there a similar way to add an additional XAxis, that is not X2Axis? What I want to do is have the inside XAxis reflect the month of the data. The outside XAxis would reflect the year. This way everything scales correctly without redundant information to the user. Both would be tied to the same value, just one displayed as MMM and the other as yyyy 回答1: Quick

How to select and enlarge a Masterpane in Zedgraph

邮差的信 提交于 2019-12-09 13:37:58
问题 I have been searching this issue in the web and have gone trough the documentation,however was not successful in finding a solution. In my code I have created a MasterPane and utilize 13 GraphPanes,The problem is that if there are many graphs, the details become indistinguishable,hence I want to select(by clicking) a graph and enlarge it.Is there a specific function to realize this goal.If not,which steps are to be followed. Thank you in advance 回答1: Even late,i hope it'll will help others.

在WPF中使用WinForm控件方法

你说的曾经没有我的故事 提交于 2019-12-09 03:42:20
下面以在 Wpf 中添加 ZedGraph (用于创建任意数据的二维线型、条型、饼型图表的一个开源类库)控件,说明在 WPF 中使用 Winform 控件的方法。 1、 首先添加对如下两个 dll 文件的引用: WindowsFormsIntegration.dll , System.Windows.Forms.dll 。 2、 由于要用到 ZedGraph 控件,所以也要添加对 ZedGraph.dll 的引用。 3、 在要使用 WinForm 控件的 WPF 窗体的 XAML 文件中添加如下内容(选中部分): 即: xmlns : wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration" xmlns : wf ="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms" xmlns : zedgraph ="clr-namespace:ZedGraph;assembly=ZedGraph" 4、 在 WPF 的容器控件内如 Grid 内首先要添加 WinForm 控件的宿主容器,用于衔接 WPF 和 WinForm , 对应 XAML 如下: < Grid > < wfi :