SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
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.
I’ve only really just got started with Scichart.
I’ve created a realtime ticking chart using candlesticks.
Its based on the examples.
The problem I have is that if I add 200 points to the graph, the graph is zoomed out so that all 200 points are on screen and visible.
I want to zoom in a bit and position the visible area to the latest points. To the front (right). The user can then scroll left to see previous points.
I’ve tried a couple things like…
IRange visibleRange = surface.getXAxes().get(0).getVisibleRange(); visibleRange.setMax(20.09); IRange foo = surface.getXAxes().get(0).getMaximumRange(); visibleRange.setMinMaxDouble(foo.getMaxAsDouble(), foo.getMaxAsDouble());
The set max works, but I cant figure out how to position the view to the latest points (the very right)
Can someone help?
Thanks for your question.
I would suggest to use getDataRange() method instead of getMaximumRange() to determine the value of the last point on the specified axis because unlike MaximumRange DataRange doesn’t apply GrowBy value if it is set.
So I think the code should look like this:
final double amountOfDataYouWantToSee = 10; final double max = axis.getDataRange().getMaxAsDouble(); axis.getVisibleRange().setMinMaxDouble(max - amountOfDataYouWantToSee, max);
Hope it helps!
Please login first to submit.