This demo illustrates how to build an Undo/Redo stack with a KeyLines chart. Drag nodes to new positions or add new ones with the buttons below before trying out the Undo and Redo actions.
Undo and Redo are reassuring additions to a KeyLines user experience, providing a simple way to roll back through recent actions and restore a previous version.
This example shows how to undo and redo chart changes made by the user. Each new action saves a chart state to the Undo stack. Reverting an action will add it to the Redo stack.
There is no limit to the number of actions you can save in the Undo/Redo stack.
Key functions used: