提交 279b90ef 编写于 作者: S sushuang

stream series color.

上级 869cd6f3
......@@ -29,8 +29,6 @@ symbolDrawProto.updateData = function (data, isIgnore) {
var seriesModel = this._seriesModel = data.hostModel;
this._isIgnore = isIgnore;
this.root.clearDisplaybles();
doRender(this, seriesModel, isIgnore);
};
......@@ -52,8 +50,11 @@ function doRender(self, seriesModel, isIgnore) {
cursorStyle: seriesModel.get('cursor')
};
root.clearDisplaybles();
var dataEachTask = data.createEachTask(function (newIdx) {
var point = data.getItemLayout(newIdx);
var color = data.getItemVisual(newIdx, 'color');
if (symbolNeedsDraw(data, newIdx, isIgnore)) {
// var symbolEl = new SymbolCtor(data, newIdx, seriesScope);
// symbolEl.attr('position', point);
......@@ -66,7 +67,7 @@ function doRender(self, seriesModel, isIgnore) {
r: 1 + Math.random() * 1
},
style: {
fill: '#121',
fill: color,
blend: 'lighter'
},
position: point
......
......@@ -25,7 +25,7 @@ var TAG = {
updateViewBase: 1
};
var TEST_PROGRESS_STEP = 300;
var TEST_PROGRESS_STEP = 700;
/**
* @constructor
......
......@@ -21,13 +21,15 @@ export default function (ecModel) {
}
// itemStyle in each data item
data.each(function (idx) {
var task = data.createEachTask(function (idx) {
var itemModel = data.getItemModel(idx);
var color = itemModel.get(colorAccessPath, true);
if (color != null) {
data.setItemVisual(idx, 'color', color);
}
});
seriesModel.pipeTask(task, 'visual');
}
}
ecModel.eachRawSeries(encodeColor);
......
......@@ -26,7 +26,7 @@
var data = [];
// var count = 1000000;
// var count = 450000;
var count = 100000;
var count = 1000000;
// var count = 5000;
for (var i = 0; i < count; i++) {
......@@ -95,7 +95,8 @@
borderWidth: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
},
z: 0
},
series : [{
name: 'pm2.5',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册