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:
- Iliya Mashin asked 2 years ago
- last edited 2 years ago
-
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.
-
Using animateVisibleRangeTo helped me. Thanks
- You must login to post comments
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:
- 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
- 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
- Andrew Burnett-Thompson answered 2 years ago
- You must login to post comments
Please login first to submit.