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/12/11 06:33:58 UTC

[incubator-echarts-doc] branch release updated: fix: add the missing doc: min/max function doc in en.

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

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


The following commit(s) were added to refs/heads/release by this push:
     new 2c2231e  fix: add the missing doc: min/max function doc in en.
2c2231e is described below

commit 2c2231e3c81289d48d52ed1f420e78ce8a1fb7f5
Author: SHUANG SU <su...@gmail.com>
AuthorDate: Wed Dec 11 14:33:40 2019 +0800

    fix: add the missing doc: min/max function doc in en.
---
 en/option/component/axis-common.md | 18 +++++++++++++++++-
 zh/option/component/axis-common.md |  8 ++++----
 2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/en/option/component/axis-common.md b/en/option/component/axis-common.md
index 3b7da65..59afdfc 100644
--- a/en/option/component/axis-common.md
+++ b/en/option/component/axis-common.md
@@ -307,7 +307,7 @@ For non-category axis, including time, numerical value, and log axes, `boundaryG
 boundaryGap: ['20%', '20%']
 ```
 
-#${prefix} min(number|string) = null
+#${prefix} min(number|string|function) = null
 
 The minimun value of axis.
 
@@ -317,6 +317,14 @@ It will be automatically computed to make sure axis tick is equally distributed
 
 In category axis, it can also be set as the ordinal number. For example, if a catergory axis has `data: ['categoryA', 'categoryB', 'categoryC']`, and the ordinal `2` represents `'categoryC'`. Moreover, it can be set as negative number, like `-3`.
 
+If `min` is specified as a function, it should return a min value, like:
+```js
+min: function (value) {
+    return value.min - 20;
+}
+```
+
+
 #${prefix} max(number|string) = null
 
 The maximum value of axis.
@@ -327,6 +335,14 @@ It will be automatically computed to make sure axis tick is equally distributed
 
 In category axis, it can also be set as the ordinal number. For example, if a catergory axis has `data: ['categoryA', 'categoryB', 'categoryC']`, and the ordinal `2` represents `'categoryC'`. Moreover, it can be set as negative number, like `-3`.
 
+If `max` is specified as a function, it should return a max value, like:
+```js
+max: function (value) {
+    return value.max - 20;
+}
+```
+
+
 #${prefix} scale(boolean) = false
 
 It is available only in numerical axis, i.e., [type](~${componentType}.type): 'value'.
diff --git a/zh/option/component/axis-common.md b/zh/option/component/axis-common.md
index f445254..d10e203 100644
--- a/zh/option/component/axis-common.md
+++ b/zh/option/component/axis-common.md
@@ -298,8 +298,8 @@ boundaryGap: ['20%', '20%']
 
 当设置成 `function` 形式时,可以根据计算得出的数据最大最小值设定坐标轴的最小值。如:
 
-```
-min: function(value) {
+```js
+min: function (value) {
     return value.min - 20;
 }
 ```
@@ -318,8 +318,8 @@ min: function(value) {
 
 当设置成 `function` 形式时,可以根据计算得出的数据最大最小值设定坐标轴的最小值。如:
 
-```
-max: function(value) {
+```js
+max: function (value) {
     return value.max - 20;
 }
 ```


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