diff options
author | srichman333 <sarah_n_richman@brown.edu> | 2023-07-31 18:49:44 -0400 |
---|---|---|
committer | srichman333 <sarah_n_richman@brown.edu> | 2023-07-31 18:49:44 -0400 |
commit | 710cb3aa93ea30799479ca7c79444f05aeab2209 (patch) | |
tree | 6d3aa44c66b92a28bbc0cc9894301eef5beab7e2 /src/client/views/nodes/DataVizBox/components/Histogram.tsx | |
parent | 74b3a04a40338a4f16027560e52ec771b7aa19be (diff) |
TableBox editable headers start
Diffstat (limited to 'src/client/views/nodes/DataVizBox/components/Histogram.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/components/Histogram.tsx | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/Histogram.tsx b/src/client/views/nodes/DataVizBox/components/Histogram.tsx index 6d0a8bf75..64e61fca8 100644 --- a/src/client/views/nodes/DataVizBox/components/Histogram.tsx +++ b/src/client/views/nodes/DataVizBox/components/Histogram.tsx @@ -443,21 +443,8 @@ export class Histogram extends React.Component<HistogramProps> { this.defaultBarColor = color; }; - @computed get editableTitle() { - const title = this.graphTitle; - return ( - <EditableText - val={title} - setVal={action(val => this.graphTitle = val as string)} - color={"black"} - size={Size.LARGE} - fillWidth - /> - ); - } - render() { - + const title = this.graphTitle; var selected: string; if (this._currSelected){ selected = '{ '; @@ -472,7 +459,13 @@ export class Histogram extends React.Component<HistogramProps> { this.props.axes.length >= 1 ? ( <div className="chart-container" > <div className="graph-title"> - {this.editableTitle} + <EditableText + val={title} + setVal={action(val => this.graphTitle = val as string)} + color={"black"} + size={Size.LARGE} + fillWidth + /> <ColorPicker tooltip={'Change Default Bar Color'} |