From f82baffbe4269deb257604a8203e10d727ff0a1b Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 28 Aug 2023 02:55:30 -0400 Subject: trying to fix more colors --- .../views/nodes/DataVizBox/components/PieChart.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/client/views/nodes/DataVizBox/components') diff --git a/src/client/views/nodes/DataVizBox/components/PieChart.tsx b/src/client/views/nodes/DataVizBox/components/PieChart.tsx index 4bd476bf3..561f39141 100644 --- a/src/client/views/nodes/DataVizBox/components/PieChart.tsx +++ b/src/client/views/nodes/DataVizBox/components/PieChart.tsx @@ -52,7 +52,6 @@ export class PieChart extends React.Component { // organized by specified number percentages/ratios if one column is selected and it contains numbers // otherwise, assume data is organized by categories @computed get byCategory() { - if (this.props.layoutDoc.dataViz_pie_asHistogram==undefined) this.props.layoutDoc.dataViz_pie_asHistogram = false; return !/\d/.test(this.props.records[0][this.props.axes[0]]) || this.props.layoutDoc.dataViz_pie_asHistogram; } // filters all data to just display selected data if brushed (created from an incoming link) @@ -324,9 +323,9 @@ export class PieChart extends React.Component { }; @action changeHistogramCheckBox = () => { - this.props.layoutDoc.dataViz_pie_asHistogram = !this.props.layoutDoc.dataViz_pie_asHistogram - this.drawChart(this._pieChartData, this.width, this.height) - } + this.props.layoutDoc.dataViz_pie_asHistogram = !this.props.layoutDoc.dataViz_pie_asHistogram; + this.drawChart(this._pieChartData, this.width, this.height); + }; render() { var titleAccessor: any = ''; @@ -367,13 +366,12 @@ export class PieChart extends React.Component { fillWidth /> - { (this.props.axes.length === 1 && /\d/.test(this.props.records[0][this.props.axes[0]]))? -
+ {this.props.axes.length === 1 && /\d/.test(this.props.records[0][this.props.axes[0]]) ? ( +
Organize data as histogram -
- : null - } +
+ ) : null}
{selected != 'none' ? (
-- cgit v1.2.3-70-g09d2