Преглед изворни кода

Update index.js (#1335)

corrected spelling in src/components/chart/pie/index.js
Rupeshiya пре 7 година
родитељ
комит
7c7fb5e3d0
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      src/components/Charts/Pie/index.js

+ 3 - 3
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') || []; // 获取图形对应的