Skip to content

Commit

Permalink
fix(marker): tweak doc for name option (fix apache/echarts#20150)
Browse files Browse the repository at this point in the history
  • Loading branch information
plainheart committed Jul 16, 2024
1 parent 85541d7 commit 76231bd
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 42 deletions.
38 changes: 27 additions & 11 deletions en/option/partial/mark-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ Used to mark an area in chart. For example, mark a time interval.
Label in mark area.

{{ use: partial-label(
prefix = ${prefix} + '##'
prefix = ${prefix} + '##',
defaultShowLabel = true,
defaultPosition = "'top'",
formatter = true
) }}

##${prefix} itemStyle(Object)
Expand All @@ -36,7 +39,10 @@ Emphasis status of mark area.
###${prefix} label(Object)

{{ use: partial-label(
prefix = ${prefix} + '###'
prefix = ${prefix} + '###',
defaultShowLabel = true,
defaultPosition = "'top'",
formatter = true
) }}

###${prefix} itemStyle(*)
Expand All @@ -56,7 +62,10 @@ Configurations of blur state. Whether to blur follows the series.
###${prefix} label(Object)

{{ use: partial-label(
prefix = ${prefix} + '###'
prefix = ${prefix} + '###',
defaultShowLabel = true,
defaultPosition = "'top'",
formatter = true
) }}

###${prefix} itemStyle(*)
Expand Down Expand Up @@ -141,8 +150,7 @@ data: [
Specify the left-top point.

{{ use: mark-area-data-item-item(
name = "start",
prefix = "###"+${prefix},
prefix = "###" + ${prefix},
seriesType = ${seriesType},
hasCoord = ${hasCoord},
hasType = ${hasType},
Expand All @@ -154,8 +162,7 @@ Specify the left-top point.
Specify the right-bottom point.

{{ use: mark-area-data-item-item(
name = "end",
prefix = "###"+${prefix},
prefix = "###" + ${prefix},
seriesType = ${seriesType},
hasCoord = ${hasCoord},
hasType = ${hasType},
Expand Down Expand Up @@ -207,7 +214,7 @@ The format is [start coordinate, end coordinate], where the coordinate system ca

#${prefix} name(string) = '${name}'

Name of the marker, which will display as a label.
Name of the marker, which will display as a label. Can be used as a template variable **data name** `{b}` in [label formatter](~series-${seriesType}.markArea.data.label.formatter).

#${prefix} x(number)

Expand Down Expand Up @@ -240,7 +247,10 @@ Label style of the item.
Label style of start point and end point will be merged together.

{{ use: partial-label(
prefix = '#'+${prefix}
prefix = '#'+${prefix},
defaultShowLabel = true,
defaultPosition = "'top'",
formatter = true
) }}

#${prefix} emphasis(Object)
Expand All @@ -258,7 +268,10 @@ Label style of start point and end point will be merged together.
##${prefix} label(Object)

{{ use: partial-label(
prefix = '##'+${prefix}
prefix = '##'+${prefix},
defaultShowLabel = true,
defaultPosition = "'top'",
formatter = true
) }}

#${prefix} blur(Object)
Expand All @@ -276,6 +289,9 @@ Label style of start point and end point will be merged together.
##${prefix} label(Object)

{{ use: partial-label(
prefix = '##'+${prefix}
prefix = '##'+${prefix},
defaultShowLabel = true,
defaultPosition = "'top'",
formatter = true
) }}

8 changes: 3 additions & 5 deletions en/option/partial/mark-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ data: [
Data of the starting point.

{{ use: mark-line-data-item-item(
name = "starting point",
prefix = "###"+${prefix},
prefix = "###" + ${prefix},
seriesType = ${seriesType},
hasCoord = ${hasCoord},
hasType = ${hasType},
Expand All @@ -171,8 +170,7 @@ Data of the starting point.
Data of the ending point.

{{ use: mark-line-data-item-item(
name = "ending point",
prefix = "###"+${prefix},
prefix = "###" + ${prefix},
seriesType = ${seriesType},
hasCoord = ${hasCoord},
hasType = ${hasType},
Expand Down Expand Up @@ -261,7 +259,7 @@ Coordinates of the starting point or ending point, whose format depends on the c

#${prefix} name(string) = '${name}'

Name of the marker, which will display as a label.
Name of the marker. Can be used as a template variable **data name** `{b}` in [label formatter](~series-${seriesType}.markLine.data.label.formatter).

#${prefix} x(number)

Expand Down
23 changes: 18 additions & 5 deletions en/option/partial/mark-point.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ Emphasis status of mark point.

{{ use: partial-label(
prefix = "###" + ${prefix},
defaultShowLabel = true,
defaultPosition = "'inside'",
formatter = true
) }}

Expand All @@ -70,6 +72,8 @@ Configurations of blur state. Whether to blur follows the series.

{{ use: partial-label(
prefix = "###" + ${prefix},
defaultShowLabel = true,
defaultPosition = "'inside'",
formatter = true
) }}

Expand Down Expand Up @@ -116,9 +120,9 @@ data: [{{ if: ${hasType} }}
]
```

###${prefix} name(string) = ''
###${prefix} name(string)

Mark point name.
Mark point name. Can be used as a template variable **data name** `{b}` in [label formatter](~series-${seriesType}.markPoint.data.label.formatter).

{{ if: ${hasType} }}
###${prefix} type(string)
Expand Down Expand Up @@ -183,7 +187,10 @@ Mark point style.
###${prefix} label(Object)

{{ use: partial-label(
prefix = ${prefix} + '###'
prefix = ${prefix} + '###',
defaultShowLabel = true,
defaultPosition = "'inside'",
formatter = true
) }}

###${prefix} emphasis(Object)
Expand All @@ -195,7 +202,10 @@ Mark point style.
####${prefix} label(Object)

{{ use: partial-label(
prefix = ${prefix} + '####'
prefix = ${prefix} + '####',
defaultShowLabel = true,
defaultPosition = "'inside'",
formatter = true
) }}

####${prefix} itemStyle(Object)
Expand All @@ -213,7 +223,10 @@ Mark point style.
####${prefix} label(Object)

{{ use: partial-label(
prefix = ${prefix} + '####'
prefix = ${prefix} + '####',
defaultShowLabel = true,
defaultPosition = "'inside'",
formatter = true
) }}

####${prefix} itemStyle(Object)
Expand Down
38 changes: 27 additions & 11 deletions zh/option/partial/mark-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
标域文本配置。

{{ use: partial-label(
prefix = ${prefix} + '##'
prefix = ${prefix} + '##',
defaultShowLabel = true,
defaultPosition = "'top'",
formatter = true
) }}

##${prefix} itemStyle(Object)
Expand All @@ -36,7 +39,10 @@
###${prefix} label(Object)

{{ use: partial-label(
prefix = ${prefix} + '###'
prefix = ${prefix} + '###',
defaultShowLabel = true,
defaultPosition = "'top'",
formatter = true
) }}

###${prefix} itemStyle(*)
Expand All @@ -56,7 +62,10 @@
###${prefix} label(Object)

{{ use: partial-label(
prefix = ${prefix} + '###'
prefix = ${prefix} + '###',
defaultShowLabel = true,
defaultPosition = "'top'",
formatter = true
) }}

###${prefix} itemStyle(*)
Expand Down Expand Up @@ -141,7 +150,6 @@ data: [
标域左上角的数据

{{ use: mark-area-data-item-item(
name = "起点",
prefix = "###"+${prefix},
seriesType = ${seriesType},
hasCoord = ${hasCoord},
Expand All @@ -154,7 +162,6 @@ data: [
标域右下角的数据

{{ use: mark-area-data-item-item(
name = "终点",
prefix = "###"+${prefix},
seriesType = ${seriesType},
hasCoord = ${hasCoord},
Expand Down Expand Up @@ -202,7 +209,7 @@ data: [

#${prefix} name(string) = '${name}'

标注名称,将会作为文字显示。
标注名称,将会作为文字显示。定义后可在 [label formatter](~series-${seriesType}.markArea.data.label.formatter) 中作为**数据名** `{b}` 模板变量使用。

#${prefix} x(number)

Expand All @@ -222,18 +229,21 @@ data: [

#${prefix} itemStyle(Object)

该数据项区域的样式,起点和终点项的`itemStyle`会合并到一起。
该数据项区域的样式,起点和终点项的 `itemStyle` 会合并到一起。

{{ use: partial-item-style(
prefix = "#"+${prefix}
) }}

#${prefix} label(Object)

该数据项标签的样式,起点和终点项的`label`会合并到一起。
该数据项标签的样式,起点和终点项的 `label` 会合并到一起。

{{ use: partial-label(
prefix = '#'+${prefix}
prefix = '#'+${prefix},
defaultShowLabel = true,
defaultPosition = "'top'",
formatter = true
) }}

#${prefix} emphasis(Object)
Expand All @@ -251,7 +261,10 @@ data: [
##${prefix} label(Object)

{{ use: partial-label(
prefix = '##'+${prefix}
prefix = '##'+${prefix},
defaultShowLabel = true,
defaultPosition = "'top'",
formatter = true
) }}

#${prefix} blur(Object)
Expand All @@ -269,6 +282,9 @@ data: [
##${prefix} label(Object)

{{ use: partial-label(
prefix = '##'+${prefix}
prefix = '##'+${prefix},
defaultShowLabel = true,
defaultPosition = "'top'",
formatter = true
) }}

8 changes: 3 additions & 5 deletions zh/option/partial/mark-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ data: [
起点的数据。

{{ use: mark-line-data-item-item(
name = "起点",
prefix = "###"+${prefix},
prefix = "###" + ${prefix},
seriesType = ${seriesType},
hasCoord = ${hasCoord},
hasType = ${hasType},
Expand All @@ -170,8 +169,7 @@ data: [
终点的数据。

{{ use: mark-line-data-item-item(
name = "终点",
prefix = "###"+${prefix},
prefix = "###" + ${prefix},
seriesType = ${seriesType},
hasCoord = ${hasCoord},
hasType = ${hasType},
Expand Down Expand Up @@ -260,7 +258,7 @@ data: [

#${prefix} name(string) = '${name}'

标注名称,将会作为文字显示
标注名称。定义后可在 [label formatter](~series-${seriesType}.markLine.data.label.formatter) 中作为**数据名** `{b}` 模板变量使用

#${prefix} x(number)

Expand Down
23 changes: 18 additions & 5 deletions zh/option/partial/mark-point.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@

{{ use: partial-label(
prefix = "###" + ${prefix},
defaultShowLabel = true,
defaultPosition = "'inside'",
formatter = true
) }}

Expand All @@ -70,6 +72,8 @@

{{ use: partial-label(
prefix = "###" + ${prefix},
defaultShowLabel = true,
defaultPosition = "'inside'",
formatter = true
) }}

Expand Down Expand Up @@ -116,9 +120,9 @@ data: [{{ if: ${hasType} }}
]
```

###${prefix} name(string) = ''
###${prefix} name(string)

标注名称。
标注名称。定义后可在 [label formatter](~series-${seriesType}.markPoint.data.label.formatter) 中作为**数据名** `{b}` 模板变量使用。

{{ if: ${hasType} }}
###${prefix} type(string)
Expand Down Expand Up @@ -183,7 +187,10 @@ data: [{{ if: ${hasType} }}
###${prefix} label(Object)

{{ use: partial-label(
prefix = ${prefix} + '###'
prefix = ${prefix} + '###',
defaultShowLabel = true,
defaultPosition = "'inside'",
formatter = true
) }}

###${prefix} emphasis(Object)
Expand All @@ -195,7 +202,10 @@ data: [{{ if: ${hasType} }}
####${prefix} label(Object)

{{ use: partial-label(
prefix = ${prefix} + '####'
prefix = ${prefix} + '####',
defaultShowLabel = true,
defaultPosition = "'inside'",
formatter = true
) }}

####${prefix} itemStyle(Object)
Expand All @@ -213,7 +223,10 @@ data: [{{ if: ${hasType} }}
####${prefix} label(Object)

{{ use: partial-label(
prefix = ${prefix} + '####'
prefix = ${prefix} + '####',
defaultShowLabel = true,
defaultPosition = "'inside'",
formatter = true
) }}

####${prefix} itemStyle(Object)
Expand Down

0 comments on commit 76231bd

Please sign in to comment.