'Do we have undo option in high charts?

Do we have undo option in high charts? For example I have few series on chart and I replaced them with new one. Do I have any option to revert it back?



Solution 1:[1]

This is a very general question, but 'undo' in the meaning of a special option is not available from the API.

However, there are many options which can be used for removing old and adding new data. In your example, you can use the remove() and addSeries() methods to achieve that.

Demo: https://jsfiddle.net/BlackLabel/tyvbk62s/

API References: https://api.highcharts.com/class-reference/Highcharts.Series#remove https://api.highcharts.com/class-reference/Highcharts.Chart#addSeries

You can also consider using localStorage as a place for storing chart.options.

Example demo: http://jsfiddle.net/BlackLabel/9b3cx178/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 magdalena