SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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 FIFOThanks for the explanations and sorry for inadvertently finding a bugMark
  • Andrew
    :-)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
    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.