diff --git a/src/components/Charts/Pie/index.js b/src/components/Charts/Pie/index.js index ac7248d75fd30a12b13a9c6fb12cb43fe72aaff7..0d0dc3c5d174a2ddf374eeccd36d947bda94249f 100644 --- a/src/components/Charts/Pie/index.js +++ b/src/components/Charts/Pie/index.js @@ -19,7 +19,7 @@ export default class Pie extends Component { }; componentDidMount() { - this.getLengendData(); + this.getLegendData(); this.resize(); window.addEventListener('resize', this.resize); } @@ -33,7 +33,7 @@ export default class Pie extends Component { legendData: [...this.state.legendData], }, () => { - this.getLengendData(); + this.getLegendData(); } ); } @@ -49,7 +49,7 @@ export default class Pie extends Component { }; // for custom lengend view - getLengendData = () => { + getLegendData = () => { if (!this.chart) return; const geom = this.chart.getAllGeoms()[0]; // 获取所有的图形 const items = geom.get('dataArray') || []; // 获取图形对应的