Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net
 Real-Time Graphics Tools for .Net (VB and C#)
 auto-scale overrides my time format

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
smertrios Posted - 03 Nov 2014 : 19:00:30
I have an RT plot for which I format the time x-axis such:

xTimeAxis.AxisLabelsFormat = ChartObj.TIMEDATEFORMAT_12HM;

When first displayed, all is good and the x-axis labels have the desired format of "HH:mm". However, as soon as I turn on Y-axis auto-scale, the format is reset to the default, e.g "HH:mm:ss".
5   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 04 Nov 2014 : 15:00:07
There other RTScrollFrame x-axis scroll modes beside the fixed extent (range) mode. Also, it possible to change the extent (range) of the x-axis in the fixed extent mode. So regardless of which x-axis scrolling mode is used, the software always calls x-axis auto-scale and auto-formatting routines.
smertrios Posted - 04 Nov 2014 : 14:44:00
ok yes, it makes sense in that the start/end time will be changed as the scrolling takes place. However, what I meant is that the time scale does not change. And as a result, I wouldn't expect my time format to be ignored; it's just counter intuitive.

fyi, I applied your fix and it works. thank you for the quick reply.

quinncurtis Posted - 04 Nov 2014 : 14:28:25
No, you are not correct. If you are using an RTScrollFrame, the x-axis is constantly auto-scaling, that is what controls the scrolling. So you must do what I describe, regardless of whether or not you use any of the y-axis auto-scale modes.
smertrios Posted - 04 Nov 2014 : 13:51:58
thanks, I'll give it a try.

However, I'm only enabling the y-axis auto-scale:

rt1.Frame.ScrollScaleModeY = ChartObj.RT_AUTOSCALE_Y_MAX;

Therefore, I do no expect the range of my x-axis to be changing, nor its label format. correct?
quinncurtis Posted - 04 Nov 2014 : 08:25:30
The auto-scale/auto-axis routines have to be able to change the format of the axis labels, because the change in range is unbounded and may vary from seconds to days. You cannot use the same format in all cases. Each time axis tick variant has a default time format. For your specific case, you can change the default formats to use ChartObj.TIMEDATEFORMAT_12HM where ever TIMEDATEFORMAT_24HMS would normally be chosen, using the code below for the x-axis labels:

xAxisLab = new TimeAxisLabels(xaxis);
xAxisLab.TextFont = axisFont;
chartVu.AddChartObject(xAxisLab);
for (int i = 0; i < TimeAxisLabels.TIMEAXIS_MINUTE; i++)
      if (xAxisLab.GetTimeBaseLabelFormats(i) == ChartObj.TIMEDATEFORMAT_24HMS)
          xAxisLab.SetTimeBaseLabelFormats(i, ChartObj.TIMEDATEFORMAT_12HM);

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07