c# - Zedgraph Duration Axis -


I am trying to get a period on one of my axis (X-axis) Currently I use a date axis, although it can not be a day. Currently I have: dates

As you can see, I have a The day is not 0, which I want, because some days could have been at 0 (well, less than 24 hours from the beginning). What I want to do is formatted as: numberOfDays hours: minutes: seconds

I currently use the following code to calculate your X: < Pre> XDate date = new XDate (0, 0, event, time, day, event, time, hour, event, time, dispute, event, time.range, event, timeline, seconds); Double x = date;

and my axis:

  graphPane.XAxis.Title.Text = xAxisTitleText.ToString (); GraphPane.XAxis.Scale.IsVisible = true; GraphPane.XAxis.Type = Axis Type.det; GraphPane.XAxis.Scale.Format = "DDHH: mm: SS";   

So finally I like the tag: 0 02:23:14 0 08:56:12 1 01:03:44

able to zoom me See outdoors and days and hours, but zoom in and watch the minutes and seconds of each event.

Note: It would be great if negative numbers can be hidden, although this is not very important.

Thank you!

I fixed my problem myself!

I did this, looking for something similar in the future:

First of all, I set the X-val of my time in my timespain's total hall Then I added a handler to xxis .ScaleFormatEvent

  graphPane.XAxis.ScaleFormatEvent + = New Axis. Scale format handler (Axis_ScaleFormatEvent); Static String Axis_ScaleFormatEvent (Graphpane Plane, axis axis, double valve, int index) {timespenn time time = timepain.formhors (val); Return time VAL.ToString (); }   

Hope this helps in looking for other things!

Note: It is also possible to do other things with this method, whatever you can change in double, and then change back should work here. Very useful content

Comments