Open davidmcclelland opened 7 years ago
How do you update your chart? I cannot reproduce this using chart.update()
.
I'm using angular-chartist, and updating the data object that's bound to chartist-data
angular-chartist calls this.chart.update(this.data, this.options);
. I can confirm, that the zoom is lost in this case.
In my test I just call chart.update();
after changing the original data. In that case, the zoom is not lost.
I'll try to figure out, how to handle this...
I'm using chartist to display data that updates frequently. I've noticed two issues in my development.
First, if the data is updated while in the middle of selecting, the selection box disappears. To counteract this, I disabled updates while the user has the mouse down. This works, but led me to my second issue.
If the chart data is updated while it is zoomed in, the zoom is lost entirely. This may be desired in some situations but is definitely not desired in mine. Perhaps an option to leave zoom persistent would be helpful?