diff --git a/en/option/component/geo-common.md b/en/option/component/geo-common.md index 12b8ac06..2b6bfa5e 100644 --- a/en/option/component/geo-common.md +++ b/en/option/component/geo-common.md @@ -241,7 +241,7 @@ Selected mode decides whether multiple selecting is supported. By default, `fals {{ use: partial-label( prefix = "#" + ${prefix}, formatter = true, - minMargin = ${labelMinMargin} + labelMargin = ${labelMargin} ) }} #${prefix} itemStyle(Object) diff --git a/en/option/partial/label.md b/en/option/partial/label.md index 402381dc..ecf87821 100644 --- a/en/option/partial/label.md +++ b/en/option/partial/label.md @@ -51,16 +51,11 @@ 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" +{{ use: partial-label-margin( + prefix = ${prefix}, + labelMargin = ${labelMargin} ) }} -Minimal margin between labels. Used when label has [layout](~series.labelLayout). -{{ /if }} - {{ if: ${formatter} }} #${prefix} formatter(string|Function) @@ -93,6 +88,59 @@ Minimal margin between labels. Used when label has [layout](~series.labelLayout) + +{{ target: partial-label-margin }} +{{ if: ${labelMargin} }} +#${prefix} textMargin(number|Array) + +{{ use: partial-version( + version = "6.0.0" +) }} + +The space around the label to escape from overlapping. The unit is px. + +Notice: `textMargin` is applied on the label's local bounding rect, that is, if there is a `rotate` specified on the label, apply `textMargin` on the non-rotated label first, and then apply the rotation. + +> The name is `textMargin` because historically the name `margin` has been used for a different purpose. + + +Examples: +```ts +// Set margin to be 5, means [5, 5, 5, 5] +textMargin: 5 +// Set the top and bottom margin to be 5, and left and right margin to be 10 +textMargin: [5, 10] +// Set each of the four margin separately +textMargin: [ + 5, // up + 10, // right + 5, // down + 10, // left +] +``` + +#${prefix} minMargin(number) + +{{ use: partial-version( + version = "5.0.0" +) }} + +Minimal margin between labels. Used when label has [layout](~series.labelLayout). + +`minMargin` conveys a similar meaning to `textMargin`, but with a different nuance. If unsure, just use `textMargin`; it basically covers `minMargin` and can provide a more compact layout for rotated labels in some scenarios. + +> TL;DR: The difference: +> + The minimal gap (if applicable) between two labels is `label1.minMargin/2 + label2.minMargin/2`, or `label1.textMargin[number] + label2.textMargin[number]`. +> + If `rotate` is specified on a label, +> + `minMargin`: first rotate the label, forming a new rect by the min/max of x/y from the four corner points (that is a expanded bounding rect), and finally `minMargin` is applied on the new rect. +> + `textMargin`: first applied on the label's local bounding rect, and then rotate. +> + Data type: `minMargin` should be only `number`, `textMargin` can be `number | number[]` (follow CSS margin). +{{ /if }} + + + + + {{ target: partial-label-position }} Label position. diff --git a/en/option/series/bar.md b/en/option/series/bar.md index 864d136e..4853db62 100644 --- a/en/option/series/bar.md +++ b/en/option/series/bar.md @@ -332,7 +332,7 @@ Label style configurations of single data. defaultPosition = "'inside'", noPosition = true, formatter = ${topLevel}, - minMargin = ${state} === 'normal' + labelMargin = ${state} === 'normal' ) }} ##${prefix} position(string|Array) = 'inside' diff --git a/en/option/series/effectScatter.md b/en/option/series/effectScatter.md index 3e30aa6a..297824b1 100644 --- a/en/option/series/effectScatter.md +++ b/en/option/series/effectScatter.md @@ -104,7 +104,7 @@ The brush type for ripples. options: `'stroke'` and `'fill'`. prefix = "##", defaultPosition = "'inside'", formatter = true, - minMargin = true + labelMargin = true ) }} ## labelLine(Object) @@ -220,7 +220,7 @@ Configurations of select state. Available when [selectedMode](~series-effectScat {{ use: partial-label( prefix = "###", defaultPosition = "inside", - minMargin = true + labelMargin = true ) }} ### labelLine(Object) diff --git a/en/option/series/funnel.md b/en/option/series/funnel.md index 75c83268..b6cba321 100644 --- a/en/option/series/funnel.md +++ b/en/option/series/funnel.md @@ -88,7 +88,7 @@ Horizontal align. Defaults to align center. Can be 'left', 'right', 'center'. prefix = "##", position = true, formatter = true, - minMargin = true + labelMargin = true ) }} ## labelLine(Object) @@ -221,7 +221,7 @@ The label configuration of a single data item. prefix = "###", position = true, formatter = false, - minMargin = true + labelMargin = true ) }} ### labelLine(Object) @@ -344,15 +344,12 @@ 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" +{{ use: partial-label-margin( + prefix = ${prefix}, + labelMargin = ${labelMargin} ) }} -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 d714f31b..d15ecf6d 100644 --- a/en/option/series/graph.md +++ b/en/option/series/graph.md @@ -210,7 +210,7 @@ The style of edge line. [lineStyle.color](~series-graph.lineStyle.color) can be prefix = "##", defaultPosition = "'inside'", formatter = true, - minMargin = true + labelMargin = true ) }} ## edgeLabel(Object) @@ -434,7 +434,7 @@ The label style of this node. {{ use: partial-label( prefix = "###", - minMargin = true + labelMargin = true ) }} ### emphasis(Object) diff --git a/en/option/series/heatmap.md b/en/option/series/heatmap.md index 9a3ae651..fe2b6e11 100644 --- a/en/option/series/heatmap.md +++ b/en/option/series/heatmap.md @@ -58,7 +58,7 @@ Work for [coordinateSystem](~series-heatmap.coordinateSystem): 'cartesian2d'. {{ use: partial-label( prefix = "##", defaultPosition = "inside", - minMargin = true + labelMargin = true ) }} ## labelLayout(Object|Function) @@ -166,7 +166,7 @@ It is valid with [coordinateSystem](~series-heatmap.coordinateSystem) of 'cartes {{ use: partial-label( prefix = "###", defaultPosition = "inside", - minMargin = true + labelMargin = true ) }} ### itemStyle(Object) diff --git a/en/option/series/line.md b/en/option/series/line.md index 42537406..79f16713 100644 --- a/en/option/series/line.md +++ b/en/option/series/line.md @@ -131,7 +131,7 @@ See the example using different `step` options: prefix = "##", defaultPosition = "'top'", formatter = true, - minMargin = true + labelMargin = true ) }} ## endLabel(Object) @@ -146,7 +146,7 @@ Label on the end of line. prefix = "##", formatter = true, noPosition = true, - minMargin = true + labelMargin = true ) }} ### valueAnimation(boolean) @@ -371,7 +371,7 @@ The style of the text of single data point. {{ use: partial-label( prefix = "###", defaultPosition = "top", - minMargin = true + labelMargin = true ) }} ### labelLine(Object) diff --git a/en/option/series/lines.md b/en/option/series/lines.md index fc7c4de1..c8b5caaf 100644 --- a/en/option/series/lines.md +++ b/en/option/series/lines.md @@ -133,7 +133,7 @@ Label settings. Does not work when [polyline](~series-lines.polyline) is `true`. {{ use: lines-label( prefix = "##", - minMargin = true + labelMargin = true ) }} ## labelLayout(Object|Function) @@ -232,7 +232,7 @@ Label of a single line. Available when [polyline](~series-lines.polyline) is not {{ use: lines-label( prefix = "###", - minMargin = true + labelMargin = true ) }} ### emphasis(Object) @@ -317,15 +317,12 @@ the position of label, options: + `'middle'` + `'end'` -{{ if: ${minMargin} }} -#${prefix} minMargin(number) -{{ use: partial-version( - version = "5.0.0" +{{ use: partial-label-margin( + prefix = ${prefix}, + labelMargin = ${labelMargin} ) }} -Minimal margin between labels. Used when label has [layout](~series-lines.labelLayout). -{{ /if }} #${prefix} formatter(string|Function) diff --git a/en/option/series/map.md b/en/option/series/map.md index c4d04b37..0aac1c8a 100644 --- a/en/option/series/map.md +++ b/en/option/series/map.md @@ -22,7 +22,7 @@ Series of same [map type](~series-map.map) will show in one map. At this point, {{ use: geo-common( prefix = '#', inMap = true, - labelMinMargin = true + labelMargin = true ) }} ## center(Array) @@ -142,7 +142,7 @@ Color of the area. formatter = true, noAlign = true, noVerticalAlign = true, - minMargin = true + labelMargin = true ) }} ### labelLine(Object) diff --git a/en/option/series/pictorialBar.md b/en/option/series/pictorialBar.md index e4531681..d0e68103 100644 --- a/en/option/series/pictorialBar.md +++ b/en/option/series/pictorialBar.md @@ -80,7 +80,7 @@ See the example below: prefix = "##", defaultPosition = "'inside'", formatter = true, - minMargin = true + labelMargin = true ) }} ## labelLine(Object) @@ -222,7 +222,7 @@ The style setting of the text label in a single bar. {{ use: partial-label( prefix = "###", defaultPosition = "inside", - minMargin = true + labelMargin = true ) }} ### labelLine(Object) diff --git a/en/option/series/pie.md b/en/option/series/pie.md index 8fba7dcc..92231986 100644 --- a/en/option/series/pie.md +++ b/en/option/series/pie.md @@ -166,7 +166,7 @@ Style of circle placeholder. prefix = "##", position = true, formatter = true, - minMargin = true + labelMargin = true ) }} ### alignTo(string) = 'none' @@ -373,7 +373,7 @@ The label configuration of a single sector. prefix = "###", position = true, formatter = false, - minMargin = true + labelMargin = true ) }} ### labelLine(Object) @@ -503,15 +503,12 @@ 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" +{{ use: partial-label-margin( + prefix = ${prefix}, + labelMargin = ${labelMargin} ) }} -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 33ca5dd2..51c58b1f 100644 --- a/en/option/series/radar.md +++ b/en/option/series/radar.md @@ -43,7 +43,7 @@ Index of [radar](~radar) component that radar chart uses. prefix = "##", defaultPosition = "'top'", formatter = true, - minMargin = true + labelMargin = true ) }} ## labelLayout(Object|Function) @@ -182,7 +182,7 @@ Style setting of the text on single inflection point. {{ use: partial-label( prefix = "###", defaultPosition = "top", - minMargin = true + labelMargin = true ) }} ### itemStyle(Object) diff --git a/en/option/series/sankey.md b/en/option/series/sankey.md index 4b5b7de3..5f46a071 100644 --- a/en/option/series/sankey.md +++ b/en/option/series/sankey.md @@ -185,7 +185,7 @@ Specify which layer is set, value starts from 0. defaultShowLabel = true, defaultPosition = "'right'", formatter1d = true, - minMargin = true + labelMargin = true ) }} ## labelLayout(Object|Function) @@ -324,7 +324,7 @@ The lable style of this node. {{ use: partial-label( prefix = "###", - minMargin = true + labelMargin = true ) }} ### emphasis(Object) diff --git a/en/option/series/scatter.md b/en/option/series/scatter.md index 879432b3..80342da7 100644 --- a/en/option/series/scatter.md +++ b/en/option/series/scatter.md @@ -51,7 +51,7 @@ It could be used with [rectangular coordinate](~grid) and [polar coordinate](~po prefix = "##", defaultPosition = "'inside'", formatter = true, - minMargin = true + labelMargin = true ) }} ## labelLine(Object) @@ -190,7 +190,7 @@ the value of data item. {{ use: partial-label( prefix = "###", defaultPosition = "inside", - minMargin = true + labelMargin = true ) }} ### labelLine(Object) diff --git a/en/option/series/sunburst.md b/en/option/series/sunburst.md index f3addad9..1642da08 100644 --- a/en/option/series/sunburst.md +++ b/en/option/series/sunburst.md @@ -41,7 +41,7 @@ If angle of data piece is smaller than this value (in degrees), then text is not defaultShowLabel = "true", noRotate = true, noAlign = true, - minMargin = ${minMargin} + labelMargin = ${labelMargin} ) }} @@ -60,7 +60,7 @@ To specify the style of the label of the sector. {{ use: partial-sunburst-label-helper( prefix = ${prefix} + '#', - minMargin = ${state} === 'normal' + labelMargin = ${state} === 'normal' ) }} #${prefix} labelLine(Object) diff --git a/en/option/series/themeRiver.md b/en/option/series/themeRiver.md index b17ff576..85c236ea 100644 --- a/en/option/series/themeRiver.md +++ b/en/option/series/themeRiver.md @@ -69,7 +69,7 @@ The index of single time axis, which defaults to be 0 because it contains only o noVerticalAlign = true, defaultColor = "'#000'", defaultFontSize = 11, - minMargin = true + labelMargin = true ) }} ## labelLine(Object) diff --git a/en/option/series/tree.md b/en/option/series/tree.md index ddd45bb0..1ab9040e 100644 --- a/en/option/series/tree.md +++ b/en/option/series/tree.md @@ -142,7 +142,7 @@ The style of each node in the tree, where [itemStyle.color](~series-tree.itemSty type: 'Array' } }, - minMargin = true + labelMargin = true ) }} ## labelLayout(Object|Function) @@ -350,7 +350,7 @@ The label of the node. {{ use: partial-label( prefix = "###", - minMargin = true + labelMargin = true ) }} ### emphasis(Object) diff --git a/en/option/series/treemap.md b/en/option/series/treemap.md index d223db32..3fecdd39 100644 --- a/en/option/series/treemap.md +++ b/en/option/series/treemap.md @@ -578,7 +578,7 @@ This can hide the details of nodes when the rectangular area is not large enough type: 'Array' } }, - minMargin = true + labelMargin = true ) }} #${prefix} upperLabel(Object) diff --git a/zh/option/component/geo-common.md b/zh/option/component/geo-common.md index cde32140..97cf07b2 100644 --- a/zh/option/component/geo-common.md +++ b/zh/option/component/geo-common.md @@ -238,7 +238,7 @@ boundingCoords: [ {{ use: partial-label( prefix = "#" + ${prefix}, formatter = true, - minMargin = ${labelMinMargin} + labelMargin = ${labelMargin} ) }} #${prefix} itemStyle(Object) diff --git a/zh/option/partial/label.md b/zh/option/partial/label.md index a398a9f9..8a4a29a5 100644 --- a/zh/option/partial/label.md +++ b/zh/option/partial/label.md @@ -51,15 +51,12 @@ ${name}图形上的文本标签,可用于说明图形的一些数据信息, 是否对文字进行偏移。默认不偏移。例如:`[30, 40]` 表示文字在横向上偏移 `30`,纵向上偏移 `40`。 -{{ if: ${minMargin} }} -#${prefix} minMargin(number) -{{ use: partial-version( - version = "5.0.0" +{{ use: partial-label-margin( + prefix = ${prefix}, + labelMargin = ${labelMargin} ) }} -用于控制标签之间的最小距离,当启用 [labelLayout](~series.labelLayout) 时可能会用到。 -{{ /if }} {{ if: ${formatter} }} #${prefix} formatter(string|Function) @@ -93,6 +90,106 @@ ${name}图形上的文本标签,可用于说明图形的一些数据信息, + + +{{ target: partial-label-margin }} +{{ if: ${labelMargin} }} +#${prefix} textMargin(number|Array) + +{{ use: partial-version( + version = "6.0.0" +) }} + +标签周围的间距,用于避免标签重叠。单位为像素(px)。 + +注意:`textMargin` 是作用在标签的本地包围盒上的,也就是说,如果标签设置了旋转(`rotate`),先在未旋转的标签上应用 `textMargin`,再进行旋转。 + +> 名字是 `textMargin`,因历史原因 `margin` 已被它用。 + +示例: +```ts +// 设置所有方向的间距为 5,等价于 [5, 5, 5, 5] +textMargin: 5 +// 设置上下间距为 5,左右间距为 10 +textMargin: [5, 10] +// 分别设置四个方向的间距 +textMargin: [ + 5, // 上 + 10, // 右 + 5, // 下 + 10, // 左 +] +``` + +#${prefix} minMargin(number) + +{{ use: partial-version( + version = "5.0.0" +) }} + +用于控制标签之间的最小距离,当启用 [labelLayout](~series.labelLayout) 时可能会用到。 + +`minMargin` 和 `textMargin` 含义相似,但有细微区别。如果不确定,可使用 `textMargin`,因为它基本包含了 `minMargin` 的能力,并且在某些旋转标签的场景下可以提供更紧凑的布局。 + +> 区别如下: +> + 两个标签之间的最小间隔(如适用)为 `label1.minMargin/2 + label2.minMargin/2`,或 `label1.textMargin[number] + label2.textMargin[number]`。 +> + 如果标签设置了 `rotate`: +> + `minMargin`:先旋转标签,取四个角的 x/y 的 min/max 得到新的矩形(即扩展后的包围盒),最后在新矩形上应用 `minMargin`。 +> + `textMargin`:先在标签的包围盒上应用 `textMargin`,再进行旋转。 +> + 数据类型:`minMargin` 只能为 `number`,`textMargin` 可以为 `number | number[]`(类似 CSS margin)。 +{{ /if }} + + +{{ if: ${labelMargin} }} +#${prefix} textMargin(number|Array) + +{{ use: partial-version( + version = "6.0.0" +) }} + +标签周围的间距,用于避免标签重叠。单位为像素(px)。 + +注意:`textMargin` 是作用在标签的本地包围盒上的,也就是说,如果标签设置了旋转(`rotate`),先在未旋转的标签上应用 `textMargin`,再进行旋转。 + +> 名字是 `textMargin`,因历史原因 `margin` 已被它用。 + +示例: +```ts +// 设置所有方向的间距为 5,等价于 [5, 5, 5, 5] +textMargin: 5 +// 设置上下间距为 5,左右间距为 10 +textMargin: [5, 10] +// 分别设置四个方向的间距 +textMargin: [ + 5, // 上 + 10, // 右 + 5, // 下 + 10, // 左 +] +``` + +#${prefix} minMargin(number) + +{{ use: partial-version( + version = "5.0.0" +) }} + +用于控制标签之间的最小距离,当启用 [labelLayout](~series.labelLayout) 时可能会用到。 + +`minMargin` 和 `textMargin` 含义相似,但有细微区别。如果不确定,可使用 `textMargin`,因为它基本包含了 `minMargin` 的能力,并且在某些旋转标签的场景下可以提供更紧凑的布局。 + +> 区别如下: +> + 两个标签之间的最小间隔(如适用)为 `label1.minMargin/2 + label2.minMargin/2`,或 `label1.textMargin[number] + label2.textMargin[number]`。 +> + 如果标签设置了 `rotate`: +> + `minMargin`:先旋转标签,取四个角的 x/y 的 min/max 得到新的矩形(即扩展后的包围盒),最后在新矩形上应用 `minMargin`。 +> + `textMargin`:先在标签的包围盒上应用 `textMargin`,再进行旋转。 +> + 数据类型:`minMargin` 只能为 `number`,`textMargin` 可以为 `number | number[]`(类似 CSS margin)。 +{{ /if }} + + + + + {{ target: partial-label-position }} 标签的位置。 diff --git a/zh/option/series/bar.md b/zh/option/series/bar.md index 4d2f900f..1ab0bd41 100644 --- a/zh/option/series/bar.md +++ b/zh/option/series/bar.md @@ -408,7 +408,7 @@ option = { defaultPosition = "'inside'", noPosition = true, formatter = ${topLevel}, - minMargin = ${state} === 'normal' + labelMargin = ${state} === 'normal' ) }} ##${prefix} position(string|Array) = 'inside' diff --git a/zh/option/series/effectScatter.md b/zh/option/series/effectScatter.md index 6b23eb9a..8cfa392d 100644 --- a/zh/option/series/effectScatter.md +++ b/zh/option/series/effectScatter.md @@ -121,7 +121,7 @@ const option = { prefix = "##", defaultPosition = "'inside'", formatter = true, - minMargin = true + labelMargin = true ) }} ## labelLine(Object) @@ -237,7 +237,7 @@ const option = { {{ use: partial-label( prefix = "###", defaultPosition = "inside", - minMargin = true + labelMargin = true ) }} ### labelLine(Object) diff --git a/zh/option/series/funnel.md b/zh/option/series/funnel.md index 4ad5265c..fb2a0e3f 100644 --- a/zh/option/series/funnel.md +++ b/zh/option/series/funnel.md @@ -110,7 +110,7 @@ option = { prefix = "##", position = true, formatter = true, - minMargin = true + labelMargin = true ) }} ## labelLine(Object) @@ -243,7 +243,7 @@ option = { prefix = "###", position = true, formatter = false, - minMargin = true + labelMargin = true ) }} ### labelLine(Object) @@ -367,15 +367,12 @@ option = { 通过[视觉引导线](~series-funnel.labelLine)连到相应的梯形。 {{ /if }} -{{ if: ${minMargin} }} -#${prefix} minMargin(number) -{{ use: partial-version( - version = "5.0.0" +{{ use: partial-label-margin( + prefix = ${prefix}, + labelMargin = ${labelMargin} ) }} -用于控制标签之间的最小距离,当启用 [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 0813a64f..11af225c 100644 --- a/zh/option/series/graph.md +++ b/zh/option/series/graph.md @@ -215,7 +215,7 @@ edgeSymbol: ['circle', 'arrow'] prefix = "##", defaultPosition = "'inside'", formatter = true, - minMargin = true + labelMargin = true ) }} ## edgeLabel(Object) @@ -442,7 +442,7 @@ data: [{ {{ use: partial-label( prefix = "###", - minMargin = true + labelMargin = true ) }} ### emphasis(Object) diff --git a/zh/option/series/heatmap.md b/zh/option/series/heatmap.md index f0fc39d6..a43f26a8 100644 --- a/zh/option/series/heatmap.md +++ b/zh/option/series/heatmap.md @@ -109,7 +109,7 @@ option = { {{ use: partial-label( prefix = "##", defaultPosition = "inside", - minMargin = true + labelMargin = true ) }} ## labelLayout(Object|Function) @@ -217,7 +217,7 @@ option = { {{ use: partial-label( prefix = "###", defaultPosition = "inside", - minMargin = true + labelMargin = true ) }} ### itemStyle(Object) diff --git a/zh/option/series/line.md b/zh/option/series/line.md index 13358f96..e456bf79 100644 --- a/zh/option/series/line.md +++ b/zh/option/series/line.md @@ -158,7 +158,7 @@ const option = { prefix = "##", defaultPosition = "'top'", formatter = true, - minMargin = true + labelMargin = true ) }} ## endLabel(Object) @@ -173,7 +173,7 @@ const option = { prefix = "##", formatter = true, noPosition = true, - minMargin = true + labelMargin = true ) }} ### valueAnimation(boolean) @@ -400,7 +400,7 @@ const option = { {{ use: partial-label( prefix = "###", defaultPosition = "top", - minMargin = true + labelMargin = true ) }} ### labelLine(Object) diff --git a/zh/option/series/lines.md b/zh/option/series/lines.md index 48a2aed3..fe5d0803 100644 --- a/zh/option/series/lines.md +++ b/zh/option/series/lines.md @@ -132,7 +132,7 @@ ECharts 2.x 里会用地图上的 `markLine` 去绘制迁徙效果,在 ECharts {{ use: lines-label( prefix = "##", - minMargin = true + labelMargin = true ) }} ## labelLayout(Object|Function) @@ -256,7 +256,7 @@ ECharts 2.x 里会用地图上的 `markLine` 去绘制迁徙效果,在 ECharts {{ use: lines-label( prefix = "###", - minMargin = true + labelMargin = true ) }} ### emphasis(Object) @@ -341,15 +341,12 @@ ECharts 2.x 里会用地图上的 `markLine` 去绘制迁徙效果,在 ECharts + `'middle'` 线的中点。 + `'end'` 线的结束点。 -{{ if: ${minMargin} }} -#${prefix} minMargin(number) -{{ use: partial-version( - version = "5.0.0" +{{ use: partial-label-margin( + prefix = ${prefix}, + labelMargin = ${labelMargin} ) }} -用于控制标签之间的最小距离,当启用 [labelLayout](~series-lines.labelLayout) 时可能会用到。 -{{ /if }} #${prefix} formatter(string|Function) diff --git a/zh/option/series/map.md b/zh/option/series/map.md index 1e89eced..4c3d9fbb 100644 --- a/zh/option/series/map.md +++ b/zh/option/series/map.md @@ -24,7 +24,7 @@ {{ use: geo-common( prefix = '#', inMap = true, - labelMinMargin = true + labelMargin = true ) }} ## center(Array) @@ -139,7 +139,7 @@ center: [115.97, '30%'] formatter = true, noAlign = true, noVerticalAlign = true, - minMargin = true + labelMargin = true ) }} ### labelLine(Object) diff --git a/zh/option/series/pictorialBar.md b/zh/option/series/pictorialBar.md index 6af69b6a..6e826f40 100644 --- a/zh/option/series/pictorialBar.md +++ b/zh/option/series/pictorialBar.md @@ -129,7 +129,7 @@ option = { prefix = "##", defaultPosition = "'inside'", formatter = true, - minMargin = true + labelMargin = true ) }} ## labelLine(Object) @@ -271,7 +271,7 @@ option = { {{ use: partial-label( prefix = "###", defaultPosition = "inside", - minMargin = true + labelMargin = true ) }} ### labelLine(Object) diff --git a/zh/option/series/pie.md b/zh/option/series/pie.md index a8c70799..aff226e2 100644 --- a/zh/option/series/pie.md +++ b/zh/option/series/pie.md @@ -189,7 +189,7 @@ const option = { prefix = "##", position = true, formatter = true, - minMargin = true + labelMargin = true ) }} ### alignTo(string) = 'none' @@ -396,7 +396,7 @@ const option = { prefix = "###", position = true, formatter = false, - minMargin = true + labelMargin = true ) }} ### labelLine(Object) @@ -547,15 +547,12 @@ const option = { + 如果为 `'tangential'`,则为切向排布。(从 `v5.2.0` 开始支持) + 如果为 `number` ,旋转指定角度,从 -90 度到 90 度。正值是逆时针。 -{{ if: ${minMargin} }} -#${prefix} minMargin(number) -{{ use: partial-version( - version = "5.0.0" +{{ use: partial-label-margin( + prefix = ${prefix}, + labelMargin = ${labelMargin} ) }} -用于控制标签之间的最小距离,当启用 [labelLayout](~series-pie.labelLayout) 时可能会用到。 -{{ /if }} {{ use: partial-text-style( prefix = ${prefix}, diff --git a/zh/option/series/radar.md b/zh/option/series/radar.md index d79062b9..ad52701f 100644 --- a/zh/option/series/radar.md +++ b/zh/option/series/radar.md @@ -79,7 +79,7 @@ const option = { prefix = "##", defaultPosition = "'top'", formatter = true, - minMargin = true + labelMargin = true ) }} ## labelLayout(Object|Function) @@ -218,7 +218,7 @@ data : [ {{ use: partial-label( prefix = "###", defaultPosition = "top", - minMargin = true + labelMargin = true ) }} ### itemStyle(Object) diff --git a/zh/option/series/sankey.md b/zh/option/series/sankey.md index 96ca60dd..240dc324 100644 --- a/zh/option/series/sankey.md +++ b/zh/option/series/sankey.md @@ -188,7 +188,7 @@ levels: [{ defaultShowLabel = true, defaultPosition = "'right'", formatter1d = true, - minMargin = true + labelMargin = true ) }} ## labelLayout(Object|Function) @@ -327,7 +327,7 @@ data: [{ {{ use: partial-label( prefix = "###", - minMargin = true + labelMargin = true ) }} ### emphasis(Object) diff --git a/zh/option/series/scatter.md b/zh/option/series/scatter.md index 38947c26..608282b9 100644 --- a/zh/option/series/scatter.md +++ b/zh/option/series/scatter.md @@ -120,7 +120,7 @@ const option = { prefix = "##", defaultPosition = "'inside'", formatter = true, - minMargin = true + labelMargin = true ) }} ## labelLine(Object) @@ -259,7 +259,7 @@ const option = { {{ use: partial-label( prefix = "###", defaultPosition = "inside", - minMargin = true + labelMargin = true ) }} ### labelLine(Object) diff --git a/zh/option/series/sunburst.md b/zh/option/series/sunburst.md index 3a7cd75c..d94f9cb4 100644 --- a/zh/option/series/sunburst.md +++ b/zh/option/series/sunburst.md @@ -41,7 +41,7 @@ defaultShowLabel = "true", noRotate = true, noAlign = true, - minMargin = ${minMargin} + labelMargin = ${labelMargin} ) }} @@ -58,7 +58,7 @@ {{ use: partial-sunburst-label-helper( prefix = ${prefix} + '#', - minMargin = ${state} === 'normal' + labelMargin = ${state} === 'normal' ) }} #${prefix} labelLine(Object) diff --git a/zh/option/series/themeRiver.md b/zh/option/series/themeRiver.md index c31e38a5..48573a34 100644 --- a/zh/option/series/themeRiver.md +++ b/zh/option/series/themeRiver.md @@ -142,7 +142,7 @@ const option = { noVerticalAlign = true, defaultColor = "'#000'", defaultFontSize = 11, - minMargin = true + labelMargin = true ) }} ## labelLine(Object) diff --git a/zh/option/series/tree.md b/zh/option/series/tree.md index 1c964b08..fd3f3fb1 100644 --- a/zh/option/series/tree.md +++ b/zh/option/series/tree.md @@ -185,7 +185,7 @@ center: [115.97, '30%'] type: 'Array' } }, - minMargin = true + labelMargin = true ) }} ## labelLayout(Object|Function) @@ -393,7 +393,7 @@ center: [115.97, '30%'] {{ use: partial-label( prefix = "###", - minMargin = true + labelMargin = true ) }} ### emphasis(Object) diff --git a/zh/option/series/treemap.md b/zh/option/series/treemap.md index cb329575..b3978271 100644 --- a/zh/option/series/treemap.md +++ b/zh/option/series/treemap.md @@ -720,7 +720,7 @@ treemap 默认把第一个维度(Array 第一项)映射到『面积』上。 type: 'Array' } }, - minMargin = true + labelMargin = true ) }} #${prefix} upperLabel(Object)