legend options

This commit is contained in:
Peter Paul Kirschner 2020-07-30 14:12:53 +02:00
parent f1315df546
commit d8adc003ae
2 changed files with 27 additions and 27 deletions

View File

@ -292,8 +292,7 @@ export default class ModernChartsWebPart extends BaseClientSideWebPart<IModernCh
this.properties.chartConfig[pPathInd].bgColors = newTheme['bgColors']; this.properties.chartConfig[pPathInd].bgColors = newTheme['bgColors'];
this.properties.chartConfig[pPathInd].hoverColors = newTheme['hoverColors']; this.properties.chartConfig[pPathInd].hoverColors = newTheme['hoverColors'];
} }
if (pPath === 'col1' && (newValue != oldValue) ) if (pPath === 'col1' && (newValue != oldValue)) {
{
this.properties.chartConfig[pPathInd].hasTaxField = false; this.properties.chartConfig[pPathInd].hasTaxField = false;
if (!!newValue if (!!newValue
&& !!this.properties.chartConfig[pPathInd].columns && !!this.properties.chartConfig[pPathInd].columns
@ -305,7 +304,8 @@ const selected=selects[0];
this.properties.chartConfig[pPathInd].hasTaxField = selected.fieldtype === 'TaxonomyFieldType'; this.properties.chartConfig[pPathInd].hasTaxField = selected.fieldtype === 'TaxonomyFieldType';
} }
}} }
}
//col1 //col1
this.context.propertyPane.refresh(); this.context.propertyPane.refresh();
this.render(); this.render();

View File

@ -52,19 +52,19 @@ export default class ModernCharts extends React.Component<IModernChartsProps, {}
tChart = <Doughnut data={data} options={options} />; tChart = <Doughnut data={data} options={options} />;
return tChart; return tChart;
case 'line': case 'line':
tChart = <Line data={data} options={options} />; debugger;
return tChart; return <Line data={data} options={options} legend={{ display: false }} />;
case 'pie': case 'pie':
tChart = <Pie data={data} options={options} />; tChart = <Pie data={data} options={options} />;
return tChart; return tChart;
case 'bar': case 'bar':
tChart = <Bar data={data} options={options} />; tChart = <Bar data={data} options={options} legend={{ display: false }} />;
return tChart; return tChart;
case 'horizontalbar': case 'horizontalbar':
tChart = <HorizontalBar data={data} options={options} />; tChart = <HorizontalBar data={data} options={options} legend={{ display: false }} />;
return tChart; return tChart;
case 'radar': case 'radar':
tChart = <Radar data={data} options={options} />; tChart = <Radar data={data} options={options} legend={{ display: false }} />;
return tChart; return tChart;
case 'polar': case 'polar':
tChart = <Polar data={data} options={options} />; tChart = <Polar data={data} options={options} />;