From a89ba9afe33d973c50c0a66aec73db1e22367913 Mon Sep 17 00:00:00 2001
From: srichman333 <sarah_n_richman@brown.edu>
Date: Thu, 10 Aug 2023 11:28:09 -0400
Subject: undo/redo for colors + titles

---
 src/client/views/nodes/DataVizBox/components/LineChart.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/client/views/nodes/DataVizBox/components/LineChart.tsx')

diff --git a/src/client/views/nodes/DataVizBox/components/LineChart.tsx b/src/client/views/nodes/DataVizBox/components/LineChart.tsx
index 053696807..49ef577e4 100644
--- a/src/client/views/nodes/DataVizBox/components/LineChart.tsx
+++ b/src/client/views/nodes/DataVizBox/components/LineChart.tsx
@@ -15,6 +15,7 @@ import { DataVizBox } from '../DataVizBox';
 import { createLineGenerator, drawLine, minMaxRange, scaleCreatorNumerical, xAxisCreator, xGrid, yAxisCreator, yGrid } from '../utils/D3Utils';
 import './Chart.scss';
 import { EditableText, Size } from 'browndash-components';
+import { undoable } from '../../../../util/UndoManager';
 
 export interface DataPoint {
     x: number;
@@ -363,7 +364,7 @@ export class LineChart extends React.Component<LineChartProps> {
                 <div className="graph-title"> 
                     <EditableText
                         val={StrCast(this.props.layoutDoc[titleAccessor])}
-                        setVal={action(val => this.props.layoutDoc[titleAccessor] = val as string)}
+                        setVal={undoable (action(val => this.props.layoutDoc[titleAccessor] = val as string), "Change Graph Title")}
                         color={"black"}
                         size={Size.LARGE}
                         fillWidth
-- 
cgit v1.2.3-70-g09d2

