Skip to content

Commit

Permalink
pie拖拽重计算图例依赖bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kener committed Nov 11, 2013
1 parent 888ea75 commit 48f561f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/chart/pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ define(function(require) {

series[seriesIndex].data.push(data);

legend.add(
legend && legend.add(
data.name,
dragged.style.color || dragged.style.strokeColor
);
Expand All @@ -1061,7 +1061,7 @@ define(function(require) {
data.name += option.nameConnector
+ ecData.get(dragged, 'name');
data.value += ecData.get(dragged, 'value');
legend.add(
legend && legend.add(
data.name,
dragged.style.color || dragged.style.strokeColor
);
Expand Down Expand Up @@ -1091,7 +1091,7 @@ define(function(require) {
var dataIndex = ecData.get(target, 'dataIndex');

// 被拖拽的图形是饼图sector,删除被拖拽走的数据
component.legend.del(
component.legend && component.legend.del(
series[seriesIndex].data[dataIndex].name
);
series[seriesIndex].data.splice(dataIndex, 1);
Expand Down

0 comments on commit 48f561f

Please sign in to comment.