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 2025/07/17 11:08:09 UTC

(echarts-doc) branch dev updated (5f3930c7 -> db69b8ce)

This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a change to branch dev
in repository https://gitbox.apache.org/repos/asf/echarts-doc.git


    from 5f3930c7 fix(matrix): Change the clamp behavior and desc.
     new 0b2c9279 Supplement the README for doc writing.
     new db69b8ce feat(visualMap): add `unboundedRange` doc.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md                                    | 43 ++++++++++++++++++++++++++--
 en/option/component/visual-map-continuous.md | 16 +++++++++++
 zh/option/component/visual-map-continuous.md | 17 +++++++++++
 3 files changed, 73 insertions(+), 3 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


(echarts-doc) 02/02: feat(visualMap): add `unboundedRange` doc.

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/echarts-doc.git

commit db69b8cef0d627a62f360757926e659022a4b483
Author: 100pah <su...@gmail.com>
AuthorDate: Thu Jul 17 19:07:57 2025 +0800

    feat(visualMap): add `unboundedRange` doc.
---
 en/option/component/visual-map-continuous.md | 16 ++++++++++++++++
 zh/option/component/visual-map-continuous.md | 17 +++++++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/en/option/component/visual-map-continuous.md b/en/option/component/visual-map-continuous.md
index d84c8171..89ecad2e 100644
--- a/en/option/component/visual-map-continuous.md
+++ b/en/option/component/visual-map-continuous.md
@@ -64,6 +64,8 @@ chart.setOption({visualMap: {min: 0, max: 400}}); // Modify min and max using se
 // Then range will be auto-modified to the new [min, max], that is, [0, 400].
 ```
 
+**Notice**: see [unboundedRange](~unboundedRange) for the special case when `range[0]` or `range[1]` touch `min` or `max`.
+
 + If `range` is set explicitly, such as [10, 300]
 
 ```javascript
@@ -80,6 +82,20 @@ chart.setOption({visualMap: {range: null}}); // Set range to null then.
 
 `range` gotten by `getOption` is always an `Array`, but not `null` or `undefined`.
 
+
+## unboundedRange(boolean) = true
+{{ use: partial-version(version = "6.0.0") }}
+
+Whether to treat the range as unbounded when `range` touches `min` or `max`.
+- `true`: when `range[0]` <= `min`, the actual range becomes `[-Infinity, range[1]]`; when `range[1]` >= `max`, the actual range becomes `[range[0], Infinity]`.
+    > NOTE:
+    >    - This provides a way to ensure all data can be considered in-range when `min`/`max` are not precisely known.
+    >    - Default is `true` for backward compatibility.
+    >    - Piecewise VisualMap does not need it, since it can define unbounded range in each piece, such as "< 12", ">= 300".
+- `false`: Disable the unbounded range behavior.
+    - Use case: e.g., `min`/`max` reflect the normal data range, and some outlier data should always be treated as out of range.
+
+
 ## calculable(boolean) = false
 
 <ExampleUIControlBoolean />
diff --git a/zh/option/component/visual-map-continuous.md b/zh/option/component/visual-map-continuous.md
index 492c4629..b2f64bab 100644
--- a/zh/option/component/visual-map-continuous.md
+++ b/zh/option/component/visual-map-continuous.md
@@ -53,6 +53,9 @@ chart.setOption({
 });
 ```
 
+**注意**: 当 `range` 等于或超出 `min` 或 `max` 时,存在特殊处理,见 [unboundedRange](~unboundedRange)。
+
+
 **setOption 改变 min、max 时 range 的自适应**
 
 + 如果 `range` 不设置(或设置为 null)
@@ -81,6 +84,20 @@ chart.setOption({visualMap: {range: null}}); // 再把 range 设为 null。
 
 `getOption` 得到的 `range` 总是 `Array`,不会为 `null` 或 `undefined`。
 
+## unboundedRange(boolean) = true
+{{ use: partial-version(version = "6.0.0") }}
+
+当 `range` 等于或超出 `min` 或 `max` 时,是否视为范围无限。
+
++ `true`: 当 `range[0] ≤ min` 时,实际范围变为 `[-Infinity, range[1]]`;当 `range[1] ≥ max` 时,实际范围变为 `[range[0], Infinity]`。
+    > 注意:
+    >    - 这种策略是为了,当无法精确确定 `min` / `max` 时,可以有方式能使所有数据都在 `inRange` 内。
+    >    - 为了历史兼容,默认值为 `true`。
+    >    - 分段型 piecewise visualMap 不需要该配置项,因为每一段可以自行定义不设限范围,例如 `"< 12"`、`">= 300"`。
++ `false`: 禁用无限范围。
+    + 使用场景:例如当 `min` / `max` 是已知的正常数据范围时,某些异常值应始终被视为 `outOfRange`。
+
+
 ## calculable(boolean) = false
 
 <ExampleUIControlBoolean />


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


(echarts-doc) 01/02: Supplement the README for doc writing.

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/echarts-doc.git

commit 0b2c9279fac1cddf3ae997c132d56e8b983450f7
Author: 100pah <su...@gmail.com>
AuthorDate: Thu Jul 17 19:07:23 2025 +0800

    Supplement the README for doc writing.
---
 README.md | 43 ++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 40 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 214e089a..79c12ab7 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,14 @@ It will:
 
 ## Tips about writing doc
 
-#### Global variables can be used in doc:
+### "Since version" is necessary in doc
+Marking "since version" indicates when a new feature was introduced.
+For example,
+```
+{{ use: partial-version(version = "6.0.0") }}
+```
+
+### Global variables can be used in doc
 
 + galleryViewPath
 + galleryEditorPath
@@ -51,7 +58,7 @@ Provide a website link in doc:
 [Apache ECharts website](${websitePath}/en/download.html)
 ```
 
-#### Reference of option
+### Reference of option
 
 A `~` can be used to refer to a option item in the same doc. For example:
 
@@ -64,7 +71,7 @@ If intending to reference an anchor in different doc, it can be:
 [itemStyle](option.html#series.itemStyle)
 ```
 
-#### Notes:
+### Notes
 
 1. Formatter will treat {{use}} as a block. So don't use it **inline**.
 
@@ -103,6 +110,36 @@ The range of values is 0 ~ 1.
 It indicates the range of saturation (color alpha) {{ if: ${prefix} !== '#' }}for nodes in a level {{ else }} of the series{{ /if }}. The range of values is 0 ~ 1.
 
 ```
+
+
+### Document Embedded Examples
+
+Declare the base echarts options (`ExampleBaseOption`), whose scope is each echarts component or series. A `ExampleBaseOption` can be shared by multiple options. e.g.,
+```md
+<ExampleBaseOption name="cartesian-bar" title="直角坐标系上的柱状图" title-en="Bar on Cartesian">
+const option = {
+    ...
+}
+</ExampleBaseOption>
+```
+
+Declare example UI control in each option, who uses the currently opened example. Supported UI controls:
++ `<ExampleUIControlBoolean default="true" />`
++ `<ExampleUIControlNumber default="8" step="0.5" />`
++ `<ExampleUIControlColor default="#d2dbee" />`
++ `<ExampleUIControlEnum options="horizontal,vertical" default="horizontal" />`
++ `<ExampleUIControlIcon default="none" />`
++ `<ExampleUIControlVector default="0,0" />`
++ `<ExampleUIControlAngle min="-90" max="90" step="1" />`
++ `<ExampleUIControlPercent default="0" />`
++ `<ExampleUIControlPercentVector min="0" dims="InnerStart,InnerEnd,OuterStart,OuterEnd" default="0,0,0,0" />`
++ `<ExampleUIControlText />`
+
+The detailed API and implementation of the UI controls can be checked in `echarts-doc/src/controls/*.vue` and `echarts-doc/src/components/OptionControl.vue`.
+
+Note: currently `ExampleBaseOption` and `ExampleUIControlXxx` will be copied (by `echarts-doc/build.js`) from `echarts-doc/zh/**/*.md` to `echarts-doc/en/**/*.md` if they are not declared in `echarts-doc/en/**/*.md`.
+
+
 ## Format Option Docs
 
 Option docs needs to be formatted before commit.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org