I have a chart that is updating dynamically. I would like to be able to position (/zoom) the chart such that the min and max are set to well-known numbers.
When I call XAxis::setMin and XAxis::setMax inside access() call, it does not have any effect unless I forcefully redraw the entire chart using Chart::drawChart. The scrollbar is enabled in the chart Configuration object.
Is there a way to cajoule the axis to the min/max I choose without forcing a redraw?
Sets the minimum and maximum of the axes after rendering has finished. If the startOnTick
and endOnTick options are true, the minimum and maximum values are rounded off to the
nearest tick. To prevent this, these options can be set to false before calling setExtremes.
Also note. chart.setTimeline(true); can be used to let the end user zoom and navigate freely. It adds a secondary “timeline” chart which the end user can control.
Hopefully this was what you were looking for.
Jens
That’s fully understandable. The API is powerful but therefore also vast. We’ve tried to highlight a lot of the features in the [demo]
(https://demo.vaadin.com/charts/) so I recommend that you browse it a bit to see what can be done. Each example has the sources available.