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!

0
0

Hi All,

When i did the Zoom I want to fixed my Scrollbar in this position (like picture) and continous to charting in real time with the same position of Scrollbar it’s possible to did this with Scichart ? because it’s possible with the lib ZedGraph but i don’t know if it’s possible with Scichart !! please i need a response and helps ! Thank you !
Best Regards, Sahar.

Images
  • You must to post comments
1
0

Hi Sahar,

Thank you for your video, it helps clarify what you want to achieve. You want to

  • Have a scrollbar on XAxis
  • When you zoom in, stop auto ranging or scrolling automatically
  • When you zoom back out, resume auto ranging or scrolling automatically

First of all, there is nothing in SciChart itself that allows you to do this exact behaviour. However, you can achieve it yourself with a very simple workaround.

enter image description here

How do we do this?

Please see the article How to have a Fixed Scrolling Time-Range on the XAxis that works with Modifiers

  • You need to update your VisibleRange when you append new data, with a simple rule:
    • If the latest XValue is inside the viewport, update VisibleRange so you scroll 1 point
    • else, do not update VisibleRange

This is implemented in the Real Time Ticking Stock Charts example.

Best regards,
Andrew

  • sahar Les
    Hi Andrew,Thanks a lot for your response, but it's possible to implement this same Scrollbar ? because my application a without Mvvm ?Best regards, Sahar
  • Andrew
    You don't need MVVM. We just use MVVM because its best practices for WPF. To implement a scrollbar in SciChart, you just set SciChartSurface.XAxis.ScrollBar = new SciChartScrollbar(). To update visible range, just set SciChartSurface.XAxis.VisibleRange(). If you want a scrollbar like the Windows scrollbar (e.g. not a SciChartScrollbar), I would not recommend this, because you need two grips (left and right) to define visible range
  • You must to post comments
0
0

Hi, but for me i added the two Scrollbar like the picture_1, but i think that i must added your Scrollbar (picture_2)?
you think that i must do the same for you or not?

Images
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.