diff --git a/src/chart/line/LineView.js b/src/chart/line/LineView.js index ea7fd3f5827084f0f1964f58f8d5a9ab958803a0..5879308b95014f08730f8787b48120b6ccd24476 100644 --- a/src/chart/line/LineView.js +++ b/src/chart/line/LineView.js @@ -281,6 +281,7 @@ function createLineClipPath(coordSys, hasAnimation, seriesModel) { rectShape.width += expandSize * 2; } } + return clipPath; } else { return createPolarClipPath(coordSys, hasAnimation, seriesModel); diff --git a/src/component/dataZoom/DataZoomModel.js b/src/component/dataZoom/DataZoomModel.js index 9c5f6a52fefba83e589c99b98ba7f954eeca15aa..9da7bf03ee717a606340554da5664b22534f9229 100644 --- a/src/component/dataZoom/DataZoomModel.js +++ b/src/component/dataZoom/DataZoomModel.js @@ -469,6 +469,16 @@ var DataZoomModel = echarts.extendComponentModel({ !ignoreUpdateRangeUsg && updateRangeUse(this, opt); }, + /** + * Set filter mode. + * This will be set in the action dispatched from toolbox. + * + * @param {string} filterMode Values can be 'filter', 'weakFilter', 'empty' ,'none' + */ + setFilterMode: function (filterMode) { + this.option.filterMode = filterMode; + }, + /** * @public * @return {Array.} [startPercent, endPercent] diff --git a/src/component/dataZoom/dataZoomAction.js b/src/component/dataZoom/dataZoomAction.js index b227e110c50520ee6aa063f9e976f33a5cc7ecad..d6795794f348f4ccadf8a961f2ce577ffcc1ee15 100644 --- a/src/component/dataZoom/dataZoomAction.js +++ b/src/component/dataZoom/dataZoomAction.js @@ -50,6 +50,11 @@ echarts.registerAction('dataZoom', function (payload, ecModel) { startValue: payload.startValue, endValue: payload.endValue }); + // Update filterMode if it's needs to be changed. + // This action is mainly dispatched from dataZoom toolbox. + if (payload.filterMode != null) { + dataZoomModel.setFilterMode(payload.filterMode); + } }); }); diff --git a/src/component/toolbox/feature/DataZoom.js b/src/component/toolbox/feature/DataZoom.js index 84a9170178c5c748ede4d991115aba8bd22ee293..fde5669a7d541b5b7e369e7a816ea8428e0e8f39 100644 --- a/src/component/toolbox/feature/DataZoom.js +++ b/src/component/toolbox/feature/DataZoom.js @@ -54,6 +54,7 @@ function DataZoom(model, ecModel, api) { DataZoom.defaultOption = { show: true, + filterMode: 'filter', // Icon group icon: { zoom: 'M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1', @@ -115,6 +116,7 @@ proto._onBrush = function (areas, opt) { } var snapshot = {}; var ecModel = this.ecModel; + var filterMode = this.model.get('filterMode'); this._brushController.updateCovers([]); // remove cover @@ -157,7 +159,9 @@ proto._onBrush = function (areas, opt) { dataZoomModel && (snapshot[dataZoomModel.id] = { dataZoomId: dataZoomModel.id, startValue: minMax[0], - endValue: minMax[1] + endValue: minMax[1], + // Set filterMode + filterMode: filterMode }); } diff --git a/test/clip.html b/test/clip.html index 9fcb0bbc90a39a0e3531188c547838af472c8ede..5802b9a88a0db208c965fc2f75428858662c19a7 100644 --- a/test/clip.html +++ b/test/clip.html @@ -49,6 +49,7 @@ under the License.
-->
+
@@ -162,6 +163,9 @@ under the License. + + + + + + + + + + + \ No newline at end of file