You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2019/10/24 17:49:43 UTC
[incubator-echarts] 01/01: fix: clarify the definition of
dataZoom.rangeMode.
This is an automated email from the ASF dual-hosted git repository.
sushuang pushed a commit to branch fix/dataZoom-rangeMode-comment
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit 2cfdb1494d85fed93ff2244d9ef24f87181b34cd
Author: SHUANG SU <su...@gmail.com>
AuthorDate: Fri Oct 25 01:49:00 2019 +0800
fix: clarify the definition of dataZoom.rangeMode.
---
src/component/dataZoom/DataZoomModel.js | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/component/dataZoom/DataZoomModel.js b/src/component/dataZoom/DataZoomModel.js
index 4388d60..97521d9 100644
--- a/src/component/dataZoom/DataZoomModel.js
+++ b/src/component/dataZoom/DataZoomModel.js
@@ -111,7 +111,21 @@ var DataZoomModel = echarts.extendComponentModel({
this._autoThrottle = true;
/**
- * 'percent' or 'value'
+ * It is `[rangeModeForMin, rangeModeForMax]`.
+ * The optional values for `rangeMode`:
+ * + `'value'` mode: the axis extent will always be determined by
+ * `dataZoom.startValue` and `dataZoom.endValue`, despite
+ * how data like and how `axis.min` and `axis.max` are.
+ * + `'percent'` mode: `100` represents 100% of the `[dMin, dMax]`,
+ * where `dMin` is `axis.min` if `axis.min` specified, otherwise `data.extent[0]`,
+ * and `dMax` is `axis.max` if `axis.max` specified, otherwise `data.extent[1]`.
+ * Axis extent will be determined by the result of the percent of `[dMin, dMax]`.
+ *
+ * For example, when users are using dynamic data (update data periodically via `setOption`),
+ * if in `'value`' mode, the window will be kept in a fixed value range despite how
+ * data are appended, while if in `'percent'` mode, whe window range will be changed alone with
+ * the appended data (suppose `axis.min` and `axis.max` are not specified).
+ *
* @private
*/
this._rangePropMode = ['percent', 'percent'];
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org