07-23-2009 05:50 PM
I am writing an application using Visual Studio 08 with measurement studio.
I want to use relative time scale on my X axis
I have tried using
graph.XAxes[0].MajorDivisions.LabelFormat = new NationalInstruments.UI.FormatString(NationalInstruments.UI.FormatStringMode.DateTime, "%<%H:%M:%S>t");
Doesnt work.
Can someone help me with this?
Solved! Go to Solution.
07-24-2009 05:01 PM
Hi Pankil,
It looks like you are close, but try using this formatting string "h:mm:ss tt":
graph.XAxes[0].MajorDivisions.LabelFormat = new NationalInstruments.UI.FormatString(NationalInstruments.UI.FormatStringMode.DateTime, "h:mm:ss tt");
This line worked in an example program I modified, but let me know if you are still havingproblems in your code.
07-24-2009 05:07 PM
Nope didnt help
Ive attached a pic of what I get with this change.
07-24-2009 05:11 PM
oops..! here is the image.
07-27-2009 05:15 PM
Hi Pankil,
It looks like the time stamps are showing up, the problem is just related to a scaling issue. To fix this, make sure you are properly converting your time axis to the proper range using xAxis.Range. If you are having trouble finding the correct values, please let me know how many data points you are plotting and what range you are using.
07-27-2009 05:42 PM
Hi,
I am using 5400 data points(90 min run)
I use (DateTime.Now - DateTimeStart).TotalSeconds for xaxis.
07-28-2009 03:34 PM
Hello Al B,
I did figure out solution for the issue
Using %H:mm:s or H:mm:s both work.
Could you elaborate what difference should '%' normally make?