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

0
0

I have a chart and a radio button group. When I click a button an app will load new data. And it works ok. But sometimes my chart doesn’t scroll to start when data is changed. I changed visibleRange for it. It can be fixed with postDelayed method but is there any good way to fix it?

My code:

enter link description here

Version
4.3.0.4646
  • Yura Khariton
    Can you give more information about why setting of VisibleRange doesn’t work for you? I believe it should work if you correctly calculate Min/Max for VisibleRange.
  • Iliya Mashin
    Using animateVisibleRangeTo helped me. Thanks
  • You must to post comments
0
0

Hi Lliya,

SciChart is designed not to automaticlaly scroll when you append or update data. You will need to do this yourself.

One of two ways:

  1. Set YAxis.setAutoRange(AutoRange.Always). This will ensure the XAXIS is always updated to fit all data. You can use this in combination with FIFO mode dataseries to get a scrolling effect
  2. Manually scroll the XAxis by setting XAxis.setVisibleRange()

For more info about the two techniques, see Tutorial 6 Adding Realtime Updates as well as our documentation on setting VisibleRange.

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.