diff options
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} |