提交 361b7694 编写于 作者: S sushuang

Merge branch 'master' of https://www.github.com/ecomfe/echarts

......@@ -30,11 +30,14 @@ var LinesSeries = SeriesModel.extend({
},
mergeOption: function (option) {
var result = this._processFlatCoordsArray(option.data);
this._flatCoords = result.flatCoords;
this._flatCoordsOffset = result.flatCoordsOffset;
if (result.flatCoords) {
option.data = new Float32Array(result.count);
if (option.data) {
// Only update when have option data to merge.
var result = this._processFlatCoordsArray(option.data);
this._flatCoords = result.flatCoords;
this._flatCoordsOffset = result.flatCoordsOffset;
if (result.flatCoords) {
option.data = new Float32Array(result.count);
}
}
LinesSeries.superApply(this, 'mergeOption', arguments);
......@@ -199,6 +202,22 @@ var LinesSeries = SeriesModel.extend({
return !!this.get('effect.show');
},
getProgressive: function () {
var progressive = this.option.progressive;
if (progressive == null) {
return this.option.large ? 1e4 : this.get('progressive');
}
return progressive;
},
getProgressiveThreshold: function () {
var progressiveThreshold = this.option.progressiveThreshold;
if (progressiveThreshold == null) {
return this.option.large ? 2e4 : this.get('progressiveThreshold');
}
return progressiveThreshold;
},
defaultOption: {
coordinateSystem: 'geo',
zlevel: 0,
......
......@@ -13,6 +13,22 @@ export default SeriesModel.extend({
brushSelector: 'point',
getProgressive: function () {
var progressive = this.option.progressive;
if (progressive == null) {
return this.option.large ? 1e4 : this.get('progressive');
}
return progressive;
},
getProgressiveThreshold: function () {
var progressiveThreshold = this.option.progressiveThreshold;
if (progressiveThreshold == null) {
return this.option.large ? 2e4 : this.get('progressiveThreshold');
}
return progressiveThreshold;
},
defaultOption: {
coordinateSystem: 'cartesian2d',
zlevel: 0,
......
......@@ -375,6 +375,22 @@ var SeriesModel = ComponentModel.extend({
return this.getRawData().mapDimension(coordDim, true);
},
/**
* Get progressive rendering count each step
* @return {number}
*/
getProgressive: function () {
return this.get('progressive');
},
/**
* Get progressive rendering count each step
* @return {number}
*/
getProgressiveThreshold: function () {
return this.get('progressiveThreshold');
},
/**
* Get data indices for show tooltip content. See tooltip.
* @abstract
......
......@@ -80,12 +80,12 @@ proto.restorePipelines = function (ecModel) {
var pipelineMap = scheduler._pipelineMap = createHashMap();
ecModel.eachSeries(function (seriesModel) {
var dataTask = seriesModel.dataTask;
var progressive = seriesModel.get('progressive');
var progressive = seriesModel.getProgressive();
pipelineMap.set(seriesModel.uid, {
head: dataTask,
tail: dataTask,
threshold: seriesModel.get('progressiveThreshold'),
threshold: seriesModel.getProgressiveThreshold(),
progressiveEnabled: progressive
&& !(seriesModel.preventIncremental && seriesModel.preventIncremental()),
bockIndex: -1,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册