Pre loader

No seconds displayed on DateTime axis

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Hello,

I do not seem to be able to have a scrolling Date/Time axis show seconds (or anything except hh:mm) regardless of what values I use for TextFormatting and SubDayTextFormatting.

Everything else works/displays as expected

My X axis XAML looks like:

<SciChart:SciChartSurface.XAxis>
<SciChart:CategoryDateTimeAxis TextFormatting=”MM/dd/yy” GrowBy=”0.1,0.1″ SubDayTextFormatting=”hh:mm:ss” AutoRange=”True” />
</SciChart:SciChartSurface.XAxis>

Many Thanks for your help

Mark

.NET 4.5, Win 7 SP1, VS2012

Images
  • You must to post comments
0
0

Hi Mark,

Yes you are absolutely right. You can gain complete control over the Axis Text Labels by using the LabelProvider. Full details in the article Specifying Text Labels with ILabelProvider

You have also highlighted a bug – the CategoryDateTimeAxis seems to be ignoring the TextFormatting/SubDayTextFormatting. The logic for other axes is 1.) obey TextFormatting first (an older API) then 2.) use LabelFormatter if one exists.

BTW the purpose of SubDayTextFormatting is to return a different string format when the visible range is intraday (in stock charts), e.g. as you zoom, it switches from dd MMM yyyy to HH:mm.

May I ask – why you prefer CategoryDateTimeAxis over DateTimeAxis? The DateTimeAxis uses value calculations to position points in the X-direction. The CategoryDateTimeAxis treats each data-point as equidistant (regardless of X-Value).

  • Mark Attwood
    Andrew, The reason for using CategoryDateTimeAxis is simply that was what I copied from one of your examples - that might also explain the slightly weird way the x-axis labels change as new data is pushed into the FIFO Thanks for the explanations and sorry for inadvertently finding a bug Mark
  • Andrew Burnett-Thompson
    :-) Try the DateTimeAxis. This has less quirks and will behave more as you expect. Also the shape of the data will be completely different between CategoryDateTimeAxis and DateTimeAxis. I'd recommend experimenting with both before deciding on which one to use. Regarding FIFO series, I did spend some time at the weekend heavily performance tuning FIFO series and the data-structures in general. There were far too many garbage collection / circular-indexing operations going on. The stutter seems to have gone and profiling results suggest a big jump in overall performance. It could be better, but it seems to be on par with, if not slightly better than v1.3. The bottleneck is now the drawing but that will be addressed soon. Anyway, an update will be available soon with various bug fixes - so expect an email!
  • Mark Attwood
    Hello Andrew, Using the DateTimeAxis works perfectly withoutout the need to resort to a custom LabelFormatter. I am so impressed with this product. Mark
  • Andrew Burnett-Thompson
    Great! Glad to hear it :) Perhaps if you become a customer you will consider contributing to our Testimonials and Client logos gallery? Getting permission to use client-names is far tougher than creating happy customers!
  • Mark Attwood
    I would be more than happy to ask for permission to write a testimonial
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies