We need to store a history of user actions. The history should be stored as two stacks: an undo stack and a redo stack. The history should be fully encapsulated in a single class so we can make one for each chart.
Stack Behavior:
Performing an action pushes it to the undo stack
Undoing an action pops it from the undo stack and pushes it to the redo stack
Redoing an action pops it from the redo stack and pushes it to the undo stack
If the redo stack isn't empty when the user performs a new action, the redo stack should be cleared
The undo stack should have a large limit, such as 200. When a new item is pushed onto the stack that exceeds the limit, the oldest item at the bottom of the stack should be removed.
📖 Overview
Depends on #74
We need to store a history of user actions. The history should be stored as two stacks: an undo stack and a redo stack. The history should be fully encapsulated in a single class so we can make one for each chart.
Stack Behavior: