Commit 7c7fb5e3 authored by Rupeshiya's avatar Rupeshiya Committed by 偏右

Update index.js (#1335)

corrected spelling in src/components/chart/pie/index.js
parent 2d47f4b0
...@@ -19,7 +19,7 @@ export default class Pie extends Component { ...@@ -19,7 +19,7 @@ export default class Pie extends Component {
}; };
componentDidMount() { componentDidMount() {
this.getLengendData(); this.getLegendData();
this.resize(); this.resize();
window.addEventListener('resize', this.resize); window.addEventListener('resize', this.resize);
} }
...@@ -33,7 +33,7 @@ export default class Pie extends Component { ...@@ -33,7 +33,7 @@ export default class Pie extends Component {
legendData: [...this.state.legendData], legendData: [...this.state.legendData],
}, },
() => { () => {
this.getLengendData(); this.getLegendData();
} }
); );
} }
...@@ -49,7 +49,7 @@ export default class Pie extends Component { ...@@ -49,7 +49,7 @@ export default class Pie extends Component {
}; };
// for custom lengend view // for custom lengend view
getLengendData = () => { getLegendData = () => {
if (!this.chart) return; if (!this.chart) return;
const geom = this.chart.getAllGeoms()[0]; // 获取所有的图形 const geom = this.chart.getAllGeoms()[0]; // 获取所有的图形
const items = geom.get('dataArray') || []; // 获取图形对应的 const items = geom.get('dataArray') || []; // 获取图形对应的
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment