提交 06d3042f 编写于 作者: S sushuang

Fix error behavior when all legend item unselected in themeRiver.

上级 b3485c4e
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
import * as echarts from '../../echarts'; import * as echarts from '../../echarts';
import {Polygon} from '../line/poly'; import {Polygon} from '../line/poly';
import * as graphic from '../../util/graphic'; import * as graphic from '../../util/graphic';
import * as zrUtil from 'zrender/src/core/util'; import {bind, extend} from 'zrender/src/core/util';
import DataDiffer from '../../data/DataDiffer'; import DataDiffer from '../../data/DataDiffer';
export default echarts.extendChartView({ export default echarts.extendChartView({
...@@ -20,10 +20,6 @@ export default echarts.extendChartView({ ...@@ -20,10 +20,6 @@ export default echarts.extendChartView({
render: function (seriesModel, ecModel, api) { render: function (seriesModel, ecModel, api) {
var data = seriesModel.getData(); var data = seriesModel.getData();
if (!data.count()) {
return;
}
var group = this.group; var group = this.group;
var layerSeries = seriesModel.getLayerSeries(); var layerSeries = seriesModel.getLayerSeries();
...@@ -44,9 +40,10 @@ export default echarts.extendChartView({ ...@@ -44,9 +40,10 @@ export default echarts.extendChartView({
var newLayersGroups = {}; var newLayersGroups = {};
dataDiffer.add(zrUtil.bind(zrUtil.curry(process, 'add'), this)) dataDiffer
.update(zrUtil.bind(zrUtil.curry(process, 'update'), this)) .add(bind(process, this, 'add'))
.remove(zrUtil.bind(zrUtil.curry(process, 'remove'), this)) .update(bind(process, this, 'update'))
.remove(bind(process, this, 'remove'))
.execute(); .execute();
function process(status, idx, oldIdx) { function process(status, idx, oldIdx) {
...@@ -137,7 +134,7 @@ export default echarts.extendChartView({ ...@@ -137,7 +134,7 @@ export default echarts.extendChartView({
textVerticalAlign: 'middle' textVerticalAlign: 'middle'
}); });
polygon.setStyle(zrUtil.extend({ polygon.setStyle(extend({
fill: color fill: color
}, itemStyleModel.getItemStyle(['color']))); }, itemStyleModel.getItemStyle(['color'])));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册