diff --git a/en/option/component/geo-common.md b/en/option/component/geo-common.md index 7d7470af5..12b8ac063 100644 --- a/en/option/component/geo-common.md +++ b/en/option/component/geo-common.md @@ -240,7 +240,8 @@ Selected mode decides whether multiple selecting is supported. By default, `fals {{ use: partial-label( prefix = "#" + ${prefix}, - formatter = true + formatter = true, + minMargin = ${labelMinMargin} ) }} #${prefix} itemStyle(Object) diff --git a/en/option/partial/item-style.md b/en/option/partial/item-style.md index 2847f28c1..fc68002c3 100644 --- a/en/option/partial/item-style.md +++ b/en/option/partial/item-style.md @@ -48,6 +48,14 @@ ${defaultBorderWidthDesc|default((${name} ? ${name} : "") + " border width. No b defaultMiterLimit = ${defaultMiterLimit} ) }} +{{ if: ${hasBorderRadius} }} + +{{ use: partial-border-radius( + prefix = "##" +) }} + +{{ /if }} + {{ use: partial-style-shadow-opacity( prefix = ${prefix}, defaultOpacity = ${defaultOpacity}, @@ -68,4 +76,3 @@ ${defaultBorderWidthDesc|default((${name} ? ${name} : "") + " border width. No b prefix = '#' + ${prefix} ) }} {{ /if }} - diff --git a/en/option/partial/label.md b/en/option/partial/label.md index f943fb609..402381dc4 100644 --- a/en/option/partial/label.md +++ b/en/option/partial/label.md @@ -51,6 +51,16 @@ See: [label rotation](${galleryEditorPath}bar-label-rotation). Whether to move text slightly. For example: `[30, 40]` means move `30` horizontally and move `40` vertically. +{{ if: ${minMargin} }} +#${prefix} minMargin(number) + +{{ use: partial-version( + version = "5.0.0" +) }} + +Minimal margin between labels. Used when label has [layout](~series.labelLayout). +{{ /if }} + {{ if: ${formatter} }} #${prefix} formatter(string|Function) diff --git a/en/option/series/bar.md b/en/option/series/bar.md index d94b3b7a5..eaafee4b1 100644 --- a/en/option/series/bar.md +++ b/en/option/series/bar.md @@ -319,7 +319,8 @@ Label style configurations of single data. prefix = "#" + ${prefix}, defaultPosition = "'inside'", noPosition = true, - formatter = ${topLevel} + formatter = ${topLevel}, + minMargin = ${state} === 'normal' ) }} ##${prefix} position(string|Array) = 'inside' diff --git a/en/option/series/effectScatter.md b/en/option/series/effectScatter.md index 13acd4627..3e30aa6a6 100644 --- a/en/option/series/effectScatter.md +++ b/en/option/series/effectScatter.md @@ -103,7 +103,8 @@ The brush type for ripples. options: `'stroke'` and `'fill'`. {{ use: partial-label( prefix = "##", defaultPosition = "'inside'", - formatter = true + formatter = true, + minMargin = true ) }} ## labelLine(Object) @@ -218,7 +219,8 @@ Configurations of select state. Available when [selectedMode](~series-effectScat {{ use: partial-label( prefix = "###", - defaultPosition = "inside" + defaultPosition = "inside", + minMargin = true ) }} ### labelLine(Object) diff --git a/en/option/series/funnel.md b/en/option/series/funnel.md index 8275c99c8..2b8faa371 100644 --- a/en/option/series/funnel.md +++ b/en/option/series/funnel.md @@ -87,7 +87,8 @@ Horizontal align. Defaults to align center. Can be 'left', 'right', 'center'. {{ use: partial-funnel-label( prefix = "##", position = true, - formatter = true + formatter = true, + minMargin = true ) }} ## labelLine(Object) @@ -219,7 +220,8 @@ The label configuration of a single data item. {{ use: partial-funnel-label( prefix = "###", position = true, - formatter = false + formatter = false, + minMargin = true ) }} ### labelLine(Object) @@ -342,6 +344,16 @@ Label position. [labelLine](~series-funnel.labelLine) can be used to guide to the corresponding trapezoid when label is not inside. {{ /if }} +{{ if: ${minMargin} }} +#${prefix} minMargin(number) + +{{ use: partial-version( + version = "5.0.0" +) }} + +Minimal margin between labels. Used when label has [layout](~series-funnel.labelLayout). +{{ /if }} + {{ if: ${formatter} }} #${prefix} formatter(string|Function) diff --git a/en/option/series/graph.md b/en/option/series/graph.md index 7f24766d1..6239f528f 100644 --- a/en/option/series/graph.md +++ b/en/option/series/graph.md @@ -209,7 +209,8 @@ The style of edge line. [lineStyle.color](~series-graph.lineStyle.color) can be {{ use: partial-label( prefix = "##", defaultPosition = "'inside'", - formatter = true + formatter = true, + minMargin = true ) }} ## edgeLabel(Object) @@ -432,7 +433,8 @@ The style of this node. The label style of this node. {{ use: partial-label( - prefix = "###" + prefix = "###", + minMargin = true ) }} ### emphasis(Object) diff --git a/en/option/series/heatmap.md b/en/option/series/heatmap.md index 761b9d100..9a3ae6511 100644 --- a/en/option/series/heatmap.md +++ b/en/option/series/heatmap.md @@ -57,7 +57,8 @@ Work for [coordinateSystem](~series-heatmap.coordinateSystem): 'cartesian2d'. {{ use: partial-label( prefix = "##", - defaultPosition = "inside" + defaultPosition = "inside", + minMargin = true ) }} ## labelLayout(Object|Function) @@ -164,7 +165,8 @@ It is valid with [coordinateSystem](~series-heatmap.coordinateSystem) of 'cartes {{ use: partial-label( prefix = "###", - defaultPosition = "inside" + defaultPosition = "inside", + minMargin = true ) }} ### itemStyle(Object) diff --git a/en/option/series/line.md b/en/option/series/line.md index 3bdfc4cbb..d51284a1d 100644 --- a/en/option/series/line.md +++ b/en/option/series/line.md @@ -118,7 +118,8 @@ See the example using different `step` options: {{ use: partial-label( prefix = "##", defaultPosition = "'top'", - formatter = true + formatter = true, + minMargin = true ) }} ## endLabel(Object) @@ -132,7 +133,8 @@ Label on the end of line. {{ use: partial-label( prefix = "##", formatter = true, - noPosition = true + noPosition = true, + minMargin = true ) }} ### valueAnimation(boolean) @@ -356,7 +358,8 @@ The style of the text of single data point. {{ use: partial-label( prefix = "###", - defaultPosition = "top" + defaultPosition = "top", + minMargin = true ) }} ### labelLine(Object) diff --git a/en/option/series/lines.md b/en/option/series/lines.md index 7817e92c9..0a61de5fe 100644 --- a/en/option/series/lines.md +++ b/en/option/series/lines.md @@ -132,7 +132,8 @@ The curveness of edge. The values from 0 to 1 could be set. The curveness would Label settings. Does not work when [polyline](~series-lines.polyline) is `true`. {{ use: lines-label( - prefix = "##" + prefix = "##", + minMargin = true ) }} ## labelLayout(Object|Function) @@ -230,7 +231,8 @@ The line style of this data item. Label of a single line. Available when [polyline](~series-lines.polyline) is not `true`. {{ use: lines-label( - prefix = "###" + prefix = "###", + minMargin = true ) }} ### emphasis(Object) @@ -315,6 +317,16 @@ the position of label, options: + `'middle'` + `'end'` +{{ if: ${minMargin} }} +#${prefix} minMargin(number) + +{{ use: partial-version( + version = "5.0.0" +) }} + +Minimal margin between labels. Used when label has [layout](~series-lines.labelLayout). +{{ /if }} + #${prefix} formatter(string|Function) {{ use: partial-2d-data-label-formatter() }} diff --git a/en/option/series/map.md b/en/option/series/map.md index b7c6ff033..e7e4104a5 100644 --- a/en/option/series/map.md +++ b/en/option/series/map.md @@ -21,7 +21,8 @@ Series of same [map type](~series-map.map) will show in one map. At this point, {{ use: geo-common( prefix = '#', - inMap = true + inMap = true, + labelMinMargin = true ) }} ## center(Array) @@ -135,7 +136,8 @@ Color of the area. defaultPosition = "'bottom'", formatter = true, noAlign = true, - noVerticalAlign = true + noVerticalAlign = true, + minMargin = true ) }} ### labelLine(Object) diff --git a/en/option/series/pictorialBar.md b/en/option/series/pictorialBar.md index 551e3a892..0ca8a9e7f 100644 --- a/en/option/series/pictorialBar.md +++ b/en/option/series/pictorialBar.md @@ -79,7 +79,8 @@ See the example below: {{ use: partial-label( prefix = "##", defaultPosition = "'inside'", - formatter = true + formatter = true, + minMargin = true ) }} ## labelLine(Object) @@ -210,7 +211,8 @@ The style setting of the text label in a single bar. {{ use: partial-label( prefix = "###", - defaultPosition = "inside" + defaultPosition = "inside", + minMargin = true ) }} ### labelLine(Object) diff --git a/en/option/series/pie.md b/en/option/series/pie.md index 267176d14..8fba7dcc1 100644 --- a/en/option/series/pie.md +++ b/en/option/series/pie.md @@ -165,7 +165,8 @@ Style of circle placeholder. {{ use: partial-pie-label( prefix = "##", position = true, - formatter = true + formatter = true, + minMargin = true ) }} ### alignTo(string) = 'none' @@ -371,7 +372,8 @@ The label configuration of a single sector. {{ use: partial-pie-label( prefix = "###", position = true, - formatter = false + formatter = false, + minMargin = true ) }} ### labelLine(Object) @@ -501,6 +503,16 @@ The position of label. In the center of pie chart. See [pie-doughnut example](${galleryEditorPath}pie-doughnut) {{ /if }} +{{ if: ${minMargin} }} +#${prefix} minMargin(number) + +{{ use: partial-version( + version = "5.0.0" +) }} + +Minimal margin between labels. Used when label has [layout](~series-pie.labelLayout). +{{ /if }} + {{ if: ${formatter} }} #${prefix} formatter(string|Function) diff --git a/en/option/series/radar.md b/en/option/series/radar.md index eb2d3417c..33ca5dd23 100644 --- a/en/option/series/radar.md +++ b/en/option/series/radar.md @@ -42,7 +42,8 @@ Index of [radar](~radar) component that radar chart uses. {{ use: partial-label( prefix = "##", defaultPosition = "'top'", - formatter = true + formatter = true, + minMargin = true ) }} ## labelLayout(Object|Function) @@ -180,7 +181,8 @@ Style setting of the text on single inflection point. {{ use: partial-label( prefix = "###", - defaultPosition = "top" + defaultPosition = "top", + minMargin = true ) }} ### itemStyle(Object) diff --git a/en/option/series/sankey.md b/en/option/series/sankey.md index c7dcf651e..f82e1d3e8 100644 --- a/en/option/series/sankey.md +++ b/en/option/series/sankey.md @@ -184,7 +184,8 @@ Specify which layer is set, value starts from 0. prefix = "##", defaultShowLabel = true, defaultPosition = "'right'", - formatter1d = true + formatter1d = true, + minMargin = true ) }} ## labelLayout(Object|Function) @@ -202,7 +203,8 @@ The style of node rectangle in Sankey diagram. useColorPalatte = true, defaultBorderWidth = 1, defaultBorderColor = "'#aaa'", - useDecal = true + useDecal = true, + hasBorderRadius = true, ) }} ## lineStyle(Object) @@ -310,7 +312,8 @@ The style of this node. The lable style of this node. {{ use: partial-label( - prefix = "###" + prefix = "###", + minMargin = true ) }} ### emphasis(Object) @@ -541,7 +544,7 @@ The line style of edge. version = "5.4.1" ) }} -The label style of each edge/link. +The label style of each edge/link. {{ use: partial-label( prefix = ${prefix}, diff --git a/en/option/series/scatter.md b/en/option/series/scatter.md index 702021815..879432b36 100644 --- a/en/option/series/scatter.md +++ b/en/option/series/scatter.md @@ -50,7 +50,8 @@ It could be used with [rectangular coordinate](~grid) and [polar coordinate](~po {{ use: partial-label( prefix = "##", defaultPosition = "'inside'", - formatter = true + formatter = true, + minMargin = true ) }} ## labelLine(Object) @@ -188,7 +189,8 @@ the value of data item. {{ use: partial-label( prefix = "###", - defaultPosition = "inside" + defaultPosition = "inside", + minMargin = true ) }} ### labelLine(Object) diff --git a/en/option/series/sunburst.md b/en/option/series/sunburst.md index 0c40d2309..6927ec231 100644 --- a/en/option/series/sunburst.md +++ b/en/option/series/sunburst.md @@ -40,7 +40,8 @@ If angle of data piece is smaller than this value (in degrees), then text is not }, defaultShowLabel = "true", noRotate = true, - noAlign = true + noAlign = true, + minMargin = ${minMargin} ) }} @@ -58,7 +59,8 @@ To specify the style of the label of the sector. ) }} {{ use: partial-sunburst-label-helper( - prefix = ${prefix} + '#' + prefix = ${prefix} + '#', + minMargin = ${state} === 'normal' ) }} #${prefix} labelLine(Object) diff --git a/en/option/series/themeRiver.md b/en/option/series/themeRiver.md index 15f5ab822..b17ff5765 100644 --- a/en/option/series/themeRiver.md +++ b/en/option/series/themeRiver.md @@ -68,7 +68,8 @@ The index of single time axis, which defaults to be 0 because it contains only o noAlign = true, noVerticalAlign = true, defaultColor = "'#000'", - defaultFontSize = 11 + defaultFontSize = 11, + minMargin = true ) }} ## labelLine(Object) diff --git a/en/option/series/tree.md b/en/option/series/tree.md index 53a57135d..2f5c8bb71 100644 --- a/en/option/series/tree.md +++ b/en/option/series/tree.md @@ -141,7 +141,8 @@ The style of each node in the tree, where [itemStyle.color](~series-tree.itemSty desc: 'The ancestors of current node (including self)', type: 'Array' } - } + }, + minMargin = true ) }} ## labelLayout(Object|Function) @@ -348,7 +349,8 @@ Defines the style of the tree edge. The label of the node. {{ use: partial-label( - prefix = "###" + prefix = "###", + minMargin = true ) }} ### emphasis(Object) diff --git a/en/option/series/treemap.md b/en/option/series/treemap.md index 9e5b1f800..1fbe2588f 100644 --- a/en/option/series/treemap.md +++ b/en/option/series/treemap.md @@ -561,7 +561,8 @@ This can hide the details of nodes when the rectangular area is not large enough desc: 'The ancestors of current node (including self)', type: 'Array' } - } + }, + minMargin = true ) }} #${prefix} upperLabel(Object) diff --git a/tool/extractOptionKeys.js b/tool/extractOptionKeys.js index 1a4d6da5b..7d37effb2 100644 --- a/tool/extractOptionKeys.js +++ b/tool/extractOptionKeys.js @@ -3,4 +3,7 @@ const path = require('node:path'); const { extractOptionKeys } = require('./schemaHelper'); const schema = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../public/zh/documents/option.json'), 'utf-8')); -console.log(JSON.stringify(extractOptionKeys(schema))); \ No newline at end of file + +const header = `// THIS FILE IS GENERATED, DON'T MODIFY\n/* eslint-disable */`; + +fs.writeFileSync(`./option-keywords.js`, `${header}\nexport const keywords = ${JSON.stringify(extractOptionKeys(schema))};`); \ No newline at end of file diff --git a/zh/option/component/geo-common.md b/zh/option/component/geo-common.md index 51cc6e569..cde321407 100644 --- a/zh/option/component/geo-common.md +++ b/zh/option/component/geo-common.md @@ -237,7 +237,8 @@ boundingCoords: [ {{ use: partial-label( prefix = "#" + ${prefix}, - formatter = true + formatter = true, + minMargin = ${labelMinMargin} ) }} #${prefix} itemStyle(Object) diff --git a/zh/option/partial/item-style.md b/zh/option/partial/item-style.md index 5baa688f0..0c1d34f11 100644 --- a/zh/option/partial/item-style.md +++ b/zh/option/partial/item-style.md @@ -46,6 +46,14 @@ ${defaultBorderWidthDesc|default((${name} ? ${name} : "") + "描边线宽。为 defaultMiterLimit = ${defaultMiterLimit} ) }} +{{ if: ${hasBorderRadius} }} + +{{ use: partial-border-radius( + prefix = "##" +) }} + +{{ /if }} + {{ use: partial-style-shadow-opacity( prefix = ${prefix}, defaultOpacity = ${defaultOpacity}, @@ -66,4 +74,3 @@ ${defaultBorderWidthDesc|default((${name} ? ${name} : "") + "描边线宽。为 prefix = '#' + ${prefix} ) }} {{ /if }} - diff --git a/zh/option/partial/label.md b/zh/option/partial/label.md index 9e4fe2fe8..a398a9f9f 100644 --- a/zh/option/partial/label.md +++ b/zh/option/partial/label.md @@ -51,6 +51,16 @@ ${name}图形上的文本标签,可用于说明图形的一些数据信息, 是否对文字进行偏移。默认不偏移。例如:`[30, 40]` 表示文字在横向上偏移 `30`,纵向上偏移 `40`。 +{{ if: ${minMargin} }} +#${prefix} minMargin(number) + +{{ use: partial-version( + version = "5.0.0" +) }} + +用于控制标签之间的最小距离,当启用 [labelLayout](~series.labelLayout) 时可能会用到。 +{{ /if }} + {{ if: ${formatter} }} #${prefix} formatter(string|Function) diff --git a/zh/option/series/bar.md b/zh/option/series/bar.md index 3bbdd5712..fd98e481d 100644 --- a/zh/option/series/bar.md +++ b/zh/option/series/bar.md @@ -395,7 +395,8 @@ option = { prefix = "#" + ${prefix}, defaultPosition = "'inside'", noPosition = true, - formatter = ${topLevel} + formatter = ${topLevel}, + minMargin = ${state} === 'normal' ) }} ##${prefix} position(string|Array) = 'inside' diff --git a/zh/option/series/effectScatter.md b/zh/option/series/effectScatter.md index e6d3b44b2..6b23eb9a9 100644 --- a/zh/option/series/effectScatter.md +++ b/zh/option/series/effectScatter.md @@ -120,7 +120,8 @@ const option = { {{ use: partial-label( prefix = "##", defaultPosition = "'inside'", - formatter = true + formatter = true, + minMargin = true ) }} ## labelLine(Object) @@ -235,7 +236,8 @@ const option = { {{ use: partial-label( prefix = "###", - defaultPosition = "inside" + defaultPosition = "inside", + minMargin = true ) }} ### labelLine(Object) diff --git a/zh/option/series/funnel.md b/zh/option/series/funnel.md index 039846869..4ad5265ce 100644 --- a/zh/option/series/funnel.md +++ b/zh/option/series/funnel.md @@ -109,7 +109,8 @@ option = { {{ use: partial-funnel-label( prefix = "##", position = true, - formatter = true + formatter = true, + minMargin = true ) }} ## labelLine(Object) @@ -241,7 +242,8 @@ option = { {{ use: partial-funnel-label( prefix = "###", position = true, - formatter = false + formatter = false, + minMargin = true ) }} ### labelLine(Object) @@ -365,6 +367,16 @@ option = { 通过[视觉引导线](~series-funnel.labelLine)连到相应的梯形。 {{ /if }} +{{ if: ${minMargin} }} +#${prefix} minMargin(number) + +{{ use: partial-version( + version = "5.0.0" +) }} + +用于控制标签之间的最小距离,当启用 [labelLayout](~series-funnel.labelLayout) 时可能会用到。 +{{ /if }} + {{ if: ${formatter} }} #${prefix} formatter(string|Function) diff --git a/zh/option/series/graph.md b/zh/option/series/graph.md index 6a2a9c62d..0813a64f4 100644 --- a/zh/option/series/graph.md +++ b/zh/option/series/graph.md @@ -214,7 +214,8 @@ edgeSymbol: ['circle', 'arrow'] {{ use: partial-label( prefix = "##", defaultPosition = "'inside'", - formatter = true + formatter = true, + minMargin = true ) }} ## edgeLabel(Object) @@ -440,7 +441,8 @@ data: [{ 该节点标签的样式。 {{ use: partial-label( - prefix = "###" + prefix = "###", + minMargin = true ) }} ### emphasis(Object) diff --git a/zh/option/series/heatmap.md b/zh/option/series/heatmap.md index 29fe94439..f0fc39d65 100644 --- a/zh/option/series/heatmap.md +++ b/zh/option/series/heatmap.md @@ -108,7 +108,8 @@ option = { {{ use: partial-label( prefix = "##", - defaultPosition = "inside" + defaultPosition = "inside", + minMargin = true ) }} ## labelLayout(Object|Function) @@ -215,7 +216,8 @@ option = { {{ use: partial-label( prefix = "###", - defaultPosition = "inside" + defaultPosition = "inside", + minMargin = true ) }} ### itemStyle(Object) diff --git a/zh/option/series/line.md b/zh/option/series/line.md index a8a7bfc31..78746d6ec 100644 --- a/zh/option/series/line.md +++ b/zh/option/series/line.md @@ -145,7 +145,8 @@ const option = { {{ use: partial-label( prefix = "##", defaultPosition = "'top'", - formatter = true + formatter = true, + minMargin = true ) }} ## endLabel(Object) @@ -159,7 +160,8 @@ const option = { {{ use: partial-label( prefix = "##", formatter = true, - noPosition = true + noPosition = true, + minMargin = true ) }} ### valueAnimation(boolean) @@ -385,7 +387,8 @@ const option = { {{ use: partial-label( prefix = "###", - defaultPosition = "top" + defaultPosition = "top", + minMargin = true ) }} ### labelLine(Object) diff --git a/zh/option/series/lines.md b/zh/option/series/lines.md index 796a02b73..48a2aed3a 100644 --- a/zh/option/series/lines.md +++ b/zh/option/series/lines.md @@ -131,7 +131,8 @@ ECharts 2.x 里会用地图上的 `markLine` 去绘制迁徙效果,在 ECharts 标签相关配置。在 [polyline](~series-lines.polyline) 设置为 `true` 时无效。 {{ use: lines-label( - prefix = "##" + prefix = "##", + minMargin = true ) }} ## labelLayout(Object|Function) @@ -254,7 +255,8 @@ ECharts 2.x 里会用地图上的 `markLine` 去绘制迁徙效果,在 ECharts 单个数据(单条线)的标签设置。在 [polyline](~series-lines.polyline) 设置为 `true` 时无效。 {{ use: lines-label( - prefix = "###" + prefix = "###", + minMargin = true ) }} ### emphasis(Object) @@ -339,6 +341,16 @@ ECharts 2.x 里会用地图上的 `markLine` 去绘制迁徙效果,在 ECharts + `'middle'` 线的中点。 + `'end'` 线的结束点。 +{{ if: ${minMargin} }} +#${prefix} minMargin(number) + +{{ use: partial-version( + version = "5.0.0" +) }} + +用于控制标签之间的最小距离,当启用 [labelLayout](~series-lines.labelLayout) 时可能会用到。 +{{ /if }} + #${prefix} formatter(string|Function) {{ use: partial-2d-data-label-formatter() }} diff --git a/zh/option/series/map.md b/zh/option/series/map.md index bb9d9ab97..0585e989c 100644 --- a/zh/option/series/map.md +++ b/zh/option/series/map.md @@ -23,7 +23,8 @@ {{ use: geo-common( prefix = '#', - inMap = true + inMap = true, + labelMinMargin = true ) }} ## center(Array) @@ -132,7 +133,8 @@ center: [115.97, '30%'] defaultPosition = "'bottom'", formatter = true, noAlign = true, - noVerticalAlign = true + noVerticalAlign = true, + minMargin = true ) }} ### labelLine(Object) diff --git a/zh/option/series/pictorialBar.md b/zh/option/series/pictorialBar.md index 48829ee94..e95aae8bc 100644 --- a/zh/option/series/pictorialBar.md +++ b/zh/option/series/pictorialBar.md @@ -128,7 +128,8 @@ option = { {{ use: partial-label( prefix = "##", defaultPosition = "'inside'", - formatter = true + formatter = true, + minMargin = true ) }} ## labelLine(Object) @@ -259,7 +260,8 @@ option = { {{ use: partial-label( prefix = "###", - defaultPosition = "inside" + defaultPosition = "inside", + minMargin = true ) }} ### labelLine(Object) diff --git a/zh/option/series/pie.md b/zh/option/series/pie.md index dfd3159e2..a8c70799c 100644 --- a/zh/option/series/pie.md +++ b/zh/option/series/pie.md @@ -188,7 +188,8 @@ const option = { {{ use: partial-pie-label( prefix = "##", position = true, - formatter = true + formatter = true, + minMargin = true ) }} ### alignTo(string) = 'none' @@ -394,7 +395,8 @@ const option = { {{ use: partial-pie-label( prefix = "###", position = true, - formatter = false + formatter = false, + minMargin = true ) }} ### labelLine(Object) @@ -545,6 +547,16 @@ const option = { + 如果为 `'tangential'`,则为切向排布。(从 `v5.2.0` 开始支持) + 如果为 `number` ,旋转指定角度,从 -90 度到 90 度。正值是逆时针。 +{{ if: ${minMargin} }} +#${prefix} minMargin(number) + +{{ use: partial-version( + version = "5.0.0" +) }} + +用于控制标签之间的最小距离,当启用 [labelLayout](~series-pie.labelLayout) 时可能会用到。 +{{ /if }} + {{ use: partial-text-style( prefix = ${prefix}, noAlign = true, diff --git a/zh/option/series/radar.md b/zh/option/series/radar.md index 79b87f0db..d79062b93 100644 --- a/zh/option/series/radar.md +++ b/zh/option/series/radar.md @@ -78,7 +78,8 @@ const option = { {{ use: partial-label( prefix = "##", defaultPosition = "'top'", - formatter = true + formatter = true, + minMargin = true ) }} ## labelLayout(Object|Function) @@ -216,7 +217,8 @@ data : [ {{ use: partial-label( prefix = "###", - defaultPosition = "top" + defaultPosition = "top", + minMargin = true ) }} ### itemStyle(Object) diff --git a/zh/option/series/sankey.md b/zh/option/series/sankey.md index 1590201f8..313ee5872 100644 --- a/zh/option/series/sankey.md +++ b/zh/option/series/sankey.md @@ -187,7 +187,8 @@ levels: [{ prefix = "##", defaultShowLabel = true, defaultPosition = "'right'", - formatter1d = true + formatter1d = true, + minMargin = true ) }} ## labelLayout(Object|Function) @@ -205,7 +206,8 @@ levels: [{ useColorPalatte = true, defaultBorderWidth = 1, defaultBorderColor = "'#aaa'", - useDecal = true + useDecal = true, + hasBorderRadius = true ) }} ## lineStyle(Object) @@ -313,7 +315,8 @@ data: [{ 该节点标签的样式。 {{ use: partial-label( - prefix = "###" + prefix = "###", + minMargin = true ) }} ### emphasis(Object) diff --git a/zh/option/series/scatter.md b/zh/option/series/scatter.md index 029a61cbf..38947c264 100644 --- a/zh/option/series/scatter.md +++ b/zh/option/series/scatter.md @@ -119,7 +119,8 @@ const option = { {{ use: partial-label( prefix = "##", defaultPosition = "'inside'", - formatter = true + formatter = true, + minMargin = true ) }} ## labelLine(Object) @@ -257,7 +258,8 @@ const option = { {{ use: partial-label( prefix = "###", - defaultPosition = "inside" + defaultPosition = "inside", + minMargin = true ) }} ### labelLine(Object) diff --git a/zh/option/series/sunburst.md b/zh/option/series/sunburst.md index 405ce84b3..5b0958bf6 100644 --- a/zh/option/series/sunburst.md +++ b/zh/option/series/sunburst.md @@ -40,7 +40,8 @@ }, defaultShowLabel = "true", noRotate = true, - noAlign = true + noAlign = true, + minMargin = ${minMargin} ) }} @@ -56,7 +57,8 @@ {{ use: partial-label-desc() }} {{ use: partial-sunburst-label-helper( - prefix = ${prefix} + '#' + prefix = ${prefix} + '#', + minMargin = ${state} === 'normal' ) }} #${prefix} labelLine(Object) diff --git a/zh/option/series/themeRiver.md b/zh/option/series/themeRiver.md index 67fa0f869..c31e38a5a 100644 --- a/zh/option/series/themeRiver.md +++ b/zh/option/series/themeRiver.md @@ -141,7 +141,8 @@ const option = { noAlign = true, noVerticalAlign = true, defaultColor = "'#000'", - defaultFontSize = 11 + defaultFontSize = 11, + minMargin = true ) }} ## labelLine(Object) diff --git a/zh/option/series/tree.md b/zh/option/series/tree.md index d630f591b..1c964b086 100644 --- a/zh/option/series/tree.md +++ b/zh/option/series/tree.md @@ -184,7 +184,8 @@ center: [115.97, '30%'] desc: '当前节点的祖先节点(包括自身)', type: 'Array' } - } + }, + minMargin = true ) }} ## labelLayout(Object|Function) @@ -391,7 +392,8 @@ center: [115.97, '30%'] 该节点的标签。 {{ use: partial-label( - prefix = "###" + prefix = "###", + minMargin = true ) }} ### emphasis(Object) diff --git a/zh/option/series/treemap.md b/zh/option/series/treemap.md index 03c3905fc..09ff574fc 100644 --- a/zh/option/series/treemap.md +++ b/zh/option/series/treemap.md @@ -703,7 +703,8 @@ treemap 默认把第一个维度(Array 第一项)映射到『面积』上。 desc: '当前节点的祖先节点(包括自身)', type: 'Array' } - } + }, + minMargin = true ) }} #${prefix} upperLabel(Object)