Pre loader

How to create a Static X-axis when we have dynamic data

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



Is there any way the X-axis can be expressed as a static time span? I would like to show the last two hours of data at all times (see the attached design). This means that the chart plot should move, but not the X-axis.

Bjørn Terje Svennes

  • You must to post comments

Hmm .. Interesting problem.

Ok try this. Have two XAxes (use our Multiple XAxis feature). Have one with a TimeSpanAxis displaying timespans from 00:00 – 02:00 and use FlipCoordinates = True (this reverses from 02:00 – 00:00). Have this axis visible.

The second axis is the real axis that you append data to. Have this axis either with Visibility=Collapsed, or set DrawLabels, DrawTicks = false.

Let me know if it works!!


  • btsvennes
    Sorry for taking so long. I've been busy working on other projects. I tried your approach and it seems to do the trick very well :-) Thank you very much for your help. Bjørn Terje
  • Andrew Burnett-Thompson
    That's great! Glad it worked :)
  • btsvennes
    A follow up question: Our charts receives data over time, so the visual range is continuously updated. This has effects on zooming since it also changes the visual range. So when the user tries to zoom at a part of the chart, the chart goes back to "normal" when a new sample is received (hence moving the time window). How do you solve this problem? I haven't found any property that can tell me whether the user has zoomed the chart or not.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.