Skip to content

Commit 73c9e61

Browse files
authored
Merge pull request #450 from apache/v6-doc
doc: update multiple docs for v6
2 parents f4c0567 + 2ead7c7 commit 73c9e61

8 files changed

Lines changed: 216 additions & 0 deletions

File tree

en/api/echarts.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,19 @@ Note:
233233
Registers a theme, should be specified when [initialize the chart instance](~echarts.init).
234234

235235

236+
## registerCustomSeries(Function)
237+
238+
{{ use: partial-version(version: '6.0.0') }}
239+
240+
Register a custom series. After registration, it can be used as [series-custom.type](option.html#series-custom.type) in [setOption](~api.html#echartsInstance.setOption).
241+
242+
```ts
243+
(type: string, renderItem: Function) => void
244+
```
245+
246+
+ `type` is the type of the chart to be registered, that is, the `series.type` written later in `setOption`.
247+
+ `renderItem` is the graphic rendering logic of the custom series. For details, see [series-custom.renderItem](option.html#series-custom.renderItem).
248+
236249
## registerLocale(Function)
237250

238251
> Since `5.0.0`

en/option/partial/mark-point.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ X position according to container, in pixel.
167167

168168
Y position according to container, in pixel.
169169

170+
###${prefix} relativeTo('container' | 'coordinate')
171+
172+
{{ use: partial-version(version: '6.0.0') }}
173+
174+
Specify whether the positions of [x](~series-${seriesType}.markPoint.data.x) and [y](~series-${seriesType}.markPoint.data.y) are relative to the entire chart container (`'container'`, default) or the grid coordinate system (`'coordinate'`).
175+
170176
###${prefix} value(number)
171177

172178
Label value, which can be ignored.

en/option/partial/text-style.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ For more details, see [Rich Text](tutorial.html#Rich%20Text) please.
111111
) }}
112112
{{ /if }}
113113

114+
#${prefix} richInheritPlainLabel(boolean) = true
114115

116+
Whether rich text inherits plain text style.
115117

116118
{{ target: partial-text-style-base-item }}
117119

en/option/partial/zr-graphic.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,71 @@ Value range: [0, 1].
10831083
) }}
10841084

10851085

1086+
#${prefix} ${hostName}${symbolDeclare}compoundPath(Object)
1087+
1088+
The union of multiple elements.
1089+
1090+
{{ use: partial-graphic-cpt-common-props(
1091+
type = 'compoundPath',
1092+
prefix = ${prefix},
1093+
optionPath = ${optionPath},
1094+
usageType = ${usageType},
1095+
hostName = ${hostName},
1096+
enableMorph = true,
1097+
symbolVisit = ${symbolVisit},
1098+
symbolDeclare = ${symbolDeclare}
1099+
) }}
1100+
1101+
##${prefix} shape(Object)
1102+
1103+
###${prefix} paths(Array)
1104+
1105+
Array of elements, each of which can be a path/rect/circle/...
1106+
1107+
{{ use: partial-graphic-cpt-sub-prop-transition(
1108+
prefix = ${prefix},
1109+
hostProp = 'shape',
1110+
optionPath = ${optionPath},
1111+
usageType = ${usageType},
1112+
hostName = ${hostName},
1113+
symbolVisit = ${symbolVisit},
1114+
symbolDeclare = ${symbolDeclare}
1115+
) }}
1116+
1117+
##${prefix} style(Object)
1118+
1119+
{{ use: partial-graphic-cpt-style-prop-common(
1120+
prefix = ${prefix},
1121+
optionPath = ${optionPath},
1122+
usageType = ${usageType},
1123+
hostName = ${hostName},
1124+
symbolVisit = ${symbolVisit},
1125+
symbolDeclare = ${symbolDeclare}
1126+
) }}
1127+
1128+
{{ use: partial-graphic-cpt-focus-blur(
1129+
prefix = ${prefix}
1130+
) }}
1131+
1132+
{{ use: partial-graphic-cpt-style-emphasis(
1133+
prefix = ${prefix},
1134+
optionPath = ${optionPath},
1135+
usageType = ${usageType},
1136+
hostName = ${hostName},
1137+
symbolVisit = ${symbolVisit},
1138+
symbolDeclare = ${symbolDeclare}
1139+
) }}
1140+
1141+
{{ use: partial-graphic-cpt-event-handlers(
1142+
prefix = ${prefix},
1143+
optionPath = ${optionPath},
1144+
usageType = ${usageType},
1145+
hostName = ${hostName},
1146+
symbolVisit = ${symbolVisit},
1147+
symbolDeclare = ${symbolDeclare}
1148+
) }}
1149+
1150+
10861151

10871152
{{ target: partial-graphic-cpt-common-props }}
10881153

@@ -1396,6 +1461,12 @@ chart.on('click', function (params) {
13961461
13971462
Whether response to mouse events / touch events.
13981463
1464+
{{ if: ${usageType} === 'customSeries' }}
1465+
{{ use: partial-custom-series-tooltipDisabled(
1466+
prefix = ${prefix}
1467+
) }}
1468+
{{ /if }}
1469+
13991470
{{ if: ${type} !== 'group' }}
14001471
##${prefix} invisible(boolean) = false
14011472
@@ -1993,10 +2064,23 @@ Same to [style](~${optionPath}.${hostName}${symbolVisit}polygon.style).
19932064
[line](~${optionPath}.${hostName}${symbolVisit}line),
19942065
[bezierCurve](~${optionPath}.${hostName}${symbolVisit}bezierCurve),
19952066
[arc](~${optionPath}.${hostName}${symbolVisit}arc),
2067+
[compoundPath](~${optionPath}.${hostName}${symbolVisit}compoundPath),
19962068
[group](~${optionPath}.${hostName}${symbolVisit}group),
19972069
19982070
19992071
2072+
{{ target: partial-custom-series-tooltipDisabled }}
2073+
2074+
##${prefix} tooltipDisabled(boolean) = false
2075+
2076+
Whether disable triggering tooltip.
2077+
2078+
{{ use: partial-version(
2079+
version = '6.0.0'
2080+
) }}
2081+
2082+
2083+
20002084
{{ target: partial-custom-series-extra }}
20012085
20022086
##${prefix} extra(Object)

zh/api/echarts.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,25 @@ echarts.registerMap('USA', usaJson, {
228228

229229
注册主题,用于[初始化实例](~echarts.init)的时候指定。
230230

231+
232+
## registerCustomSeries(Function)
233+
234+
{{ use: partial-version(version: '6.0.0') }}
235+
236+
```ts
237+
(type: string, renderItem: Function) => void
238+
```
239+
240+
注册自定义系列。注册后可以通过 [setOption](~api.html#echartsInstance.setOption) 中使用:
241+
242+
```ts
243+
(type: string, renderItem: Function) => void
244+
```
245+
246+
+ `type` 注册的图表类型,也就是之后在 `setOption` 中写的 `series.type`
247+
+ `renderItem` 自定义系列的图形渲染逻辑,详见 [series-custom.renderItem](option.html#series-custom.renderItem)。
248+
249+
231250
## registerLocale(Function)
232251

233252
>`5.0.0` 开始支持

zh/option/partial/mark-point.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ data: [{{ if: ${hasType} }}
167167

168168
相对容器的屏幕 y 坐标,单位像素。
169169

170+
###${prefix} relativeTo('container' | 'coordinate')
171+
172+
{{ use: partial-version(version: '6.0.0') }}
173+
174+
指定 [x](~series-${seriesType}.markPoint.data.x)[y](~series-${seriesType}.markPoint.data.y) 是相对于整个图表容器(`'container'`,默认值)还是直角坐标系(`'coordinate'`)而言的位置。
175+
170176
###${prefix} value(number)
171177

172178
标注值,可以不设。

zh/option/partial/text-style.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ label: {
111111
) }}
112112
{{ /if }}
113113

114+
#${prefix} richInheritPlainLabel(boolean) = true
114115

116+
富文本样式是否继承普通文本样式。
115117

116118
{{ target: partial-text-style-base-item }}
117119

zh/option/partial/zr-graphic.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,72 @@ font: 'bolder 2em "Microsoft YaHei", sans-serif'
940940

941941
线画到百分之多少就不画了。值的范围:[0, 1]
942942

943+
944+
{{ use: partial-graphic-cpt-sub-prop-transition(
945+
prefix = ${prefix},
946+
hostProp = 'shape',
947+
optionPath = ${optionPath},
948+
usageType = ${usageType},
949+
hostName = ${hostName},
950+
symbolVisit = ${symbolVisit},
951+
symbolDeclare = ${symbolDeclare}
952+
) }}
953+
954+
##${prefix} style(Object)
955+
956+
{{ use: partial-graphic-cpt-style-prop-common(
957+
prefix = ${prefix},
958+
optionPath = ${optionPath},
959+
usageType = ${usageType},
960+
hostName = ${hostName},
961+
symbolVisit = ${symbolVisit},
962+
symbolDeclare = ${symbolDeclare}
963+
) }}
964+
965+
{{ use: partial-graphic-cpt-focus-blur(
966+
prefix = ${prefix}
967+
) }}
968+
969+
{{ use: partial-graphic-cpt-style-emphasis(
970+
prefix = ${prefix},
971+
optionPath = ${optionPath},
972+
usageType = ${usageType},
973+
hostName = ${hostName},
974+
symbolVisit = ${symbolVisit},
975+
symbolDeclare = ${symbolDeclare}
976+
) }}
977+
978+
{{ use: partial-graphic-cpt-event-handlers(
979+
prefix = ${prefix},
980+
optionPath = ${optionPath},
981+
usageType = ${usageType},
982+
hostName = ${hostName},
983+
symbolVisit = ${symbolVisit},
984+
symbolDeclare = ${symbolDeclare}
985+
) }}
986+
987+
988+
#${prefix} ${hostName}${symbolDeclare}compoundPath(Object)
989+
990+
The union of multiple elements.
991+
992+
{{ use: partial-graphic-cpt-common-props(
993+
type = 'compoundPath',
994+
prefix = ${prefix},
995+
optionPath = ${optionPath},
996+
usageType = ${usageType},
997+
hostName = ${hostName},
998+
enableMorph = true,
999+
symbolVisit = ${symbolVisit},
1000+
symbolDeclare = ${symbolDeclare}
1001+
) }}
1002+
1003+
##${prefix} shape(Object)
1004+
1005+
###${prefix} paths(Array)
1006+
1007+
图形元素的数组,元素可以是 path/rect/circle/……
1008+
9431009
{{ use: partial-graphic-cpt-sub-prop-transition(
9441010
prefix = ${prefix},
9451011
hostProp = 'shape',
@@ -1376,6 +1442,12 @@ chart.on('click', function (params) {
13761442
13771443
是否不响应鼠标以及触摸事件。
13781444
1445+
{{ if: ${usageType} === 'customSeries' }}
1446+
{{ use: partial-custom-series-tooltipDisabled(
1447+
prefix = ${prefix}
1448+
) }}
1449+
{{ /if }}
1450+
13791451
{{ if: ${type} !== 'group' }}
13801452
##${prefix} invisible(boolean) = false
13811453
@@ -1971,6 +2043,18 @@ Position of `textContent`.
19712043
19722044
19732045
2046+
{{ target: partial-custom-series-tooltipDisabled }}
2047+
2048+
##${prefix} tooltipDisabled(boolean) = false
2049+
2050+
是否不响应 tooltip。
2051+
2052+
{{ use: partial-version(
2053+
version = '6.0.0'
2054+
) }}
2055+
2056+
2057+
19742058
{{ target: partial-custom-series-extra }}
19752059
19762060
##${prefix} extra(Object)

0 commit comments

Comments
 (0)