diff options
author | srichman333 <sarah_n_richman@brown.edu> | 2023-08-10 11:28:09 -0400 |
---|---|---|
committer | srichman333 <sarah_n_richman@brown.edu> | 2023-08-10 11:28:09 -0400 |
commit | a89ba9afe33d973c50c0a66aec73db1e22367913 (patch) | |
tree | 1e99866a5bde9af7b0f4d800433e9d6bbe022b2f /src/client/views/nodes/DataVizBox/components/LineChart.tsx | |
parent | 481a847b1074c9544e947e409b96778ac4d4f852 (diff) |
undo/redo for colors + titles
Diffstat (limited to 'src/client/views/nodes/DataVizBox/components/LineChart.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/components/LineChart.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
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 |