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/PieChart.tsx | |
parent | 74b3a04a40338a4f16027560e52ec771b7aa19be (diff) |
TableBox editable headers start
Diffstat (limited to 'src/client/views/nodes/DataVizBox/components/PieChart.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/components/PieChart.tsx | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/PieChart.tsx b/src/client/views/nodes/DataVizBox/components/PieChart.tsx index 5080f0c74..47d4fb23e 100644 --- a/src/client/views/nodes/DataVizBox/components/PieChart.tsx +++ b/src/client/views/nodes/DataVizBox/components/PieChart.tsx @@ -382,20 +382,8 @@ export class PieChart extends React.Component<PieChartProps> { this.sliceColors[this._currSelected[this.props.axes[0]].replace(/\$/g, '').replace(/\%/g, '').replace(/\</g, '')] = 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 = '{ '; @@ -409,7 +397,15 @@ export class PieChart extends React.Component<PieChartProps> { return ( this.props.axes.length >= 1 ? ( <div className="chart-container"> - <div className="graph-title"> {this.editableTitle} </div> + <div className="graph-title"> + <EditableText + val={title} + setVal={action(val => this.graphTitle = val as string)} + color={"black"} + size={Size.LARGE} + fillWidth + /> + </div> {selected != 'none' ? <div className={'selected-data'}> Selected: {selected} |