From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

EditRangeDateTimeFormatMode used for... ?

In my IntensityGraph, the YAxis has two properties: EditRangeNumericFormatMode, and EditRangeDateTimeFormatMode. Presumably this means I should be able to set my axis to display either time format or numeric format, and use these properties to control the details of how those are displayed. Problem is, I can't figure out how to setup the axis to display time. All the plot and axes properties seem to support numeric value but not time value. How do I get the IntensityGraph to display an axis as time value?  Thanks.

0 Kudos
Message 1 of 6
(5,376 Views)

Hi there,

 

To display time on the scale/axes you need to set the LabelFormat to appropriate value.

The following code snippet should be clear to make you understand how to do it.

 

intensityXAxis1.MajorDivisions.LabelFormat = new FormatString(FormatStringMode.DateTime, "G");

Regards

 

Vijet Patankar

National Instruments

0 Kudos
Message 2 of 6
(5,371 Views)

OK, thanks. I guess the reason I missed this is that the VS properties editor does not give you the option of configuring date/time format from the GUI. So, configuring it via line of C# code is the only option. It would be good to mention this in the documentation for EditRangeDateTimeFormatMode.

0 Kudos
Message 3 of 6
(5,366 Views)

Hi there,

 

You can set the LabelFormat property in different ways at design time.

 

Method1)

 

change label format2.png

 

Method2)

 

change label format.png

 

Regards,

 

Vijet Patankar

National Instruments

0 Kudos
Message 4 of 6
(5,363 Views)

Thanks. But my point is, I did not see Date/Time type of option in the list.

0 Kudos
Message 5 of 6
(5,360 Views)

Never mind - I did not notice the 'Category' header at the top. Thanks!

0 Kudos
Message 6 of 6
(5,359 Views)