NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
jble
Posts: 24
0 Kudos

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.

Member vcp
Member
vcp
Posts: 86
0 Kudos

Re: EditRangeDateTimeFormatMode used for... ?

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

Member
jble
Posts: 24
0 Kudos

Re: EditRangeDateTimeFormatMode used for... ?

[ Edited ]

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.

Member vcp
Member
vcp
Posts: 86
0 Kudos

Re: EditRangeDateTimeFormatMode used for... ?

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

Member
jble
Posts: 24
0 Kudos

Re: EditRangeDateTimeFormatMode used for... ?

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

Member
jble
Posts: 24
0 Kudos

Re: EditRangeDateTimeFormatMode used for... ?

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

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page