This is an automated email from the ASF dual-hosted git repository. sushuang pushed a commit to branch feat-cartesian-layout in repository https://gitbox.apache.org/repos/asf/echarts-doc.git
commit 60bc5009e458cb27cee1a26281c5202c76e31c50 Author: 100pah <[email protected]> AuthorDate: Wed Jul 30 03:04:12 2025 +0800 (1) Fix partial-rect-layout (box layout). (2) Add param ${hostName} to partial-rect-layout . --- en/option/component/parallel.md | 2 +- en/option/component/title.md | 2 +- en/option/component/visual-map.md | 2 +- en/option/partial/rect-layout-width-height.md | 12 +++++++++--- en/option/partial/rect-layout.md | 14 ++++++++++---- en/option/series/funnel.md | 2 +- en/option/series/graph.md | 1 + en/option/series/pie.md | 2 +- en/option/series/sankey.md | 2 +- en/option/series/themeRiver.md | 2 +- en/option/series/tree.md | 2 +- en/option/series/treemap.md | 4 ++-- zh/option/component/calendar.md | 2 +- zh/option/component/legend.md | 2 +- zh/option/component/matrix.md | 2 +- zh/option/component/parallel.md | 2 +- zh/option/component/single-axis.md | 2 +- zh/option/component/timeline.md | 2 +- zh/option/component/title.md | 2 +- zh/option/component/toolbox.md | 2 +- zh/option/component/visual-map.md | 2 +- zh/option/partial/rect-layout-width-height.md | 12 +++++++++--- zh/option/partial/rect-layout.md | 14 ++++++++++---- zh/option/series/funnel.md | 2 +- zh/option/series/graph.md | 1 + zh/option/series/pie.md | 2 +- zh/option/series/sankey.md | 2 +- zh/option/series/themeRiver.md | 2 +- zh/option/series/tree.md | 2 +- zh/option/series/treemap.md | 4 ++-- 30 files changed, 66 insertions(+), 40 deletions(-) diff --git a/en/option/component/parallel.md b/en/option/component/parallel.md index 04ecbd9a..defb4156 100644 --- a/en/option/component/parallel.md +++ b/en/option/component/parallel.md @@ -13,7 +13,7 @@ ) }} {{ use: partial-rect-layout-width-height( - componentName = 'parallel ', + componentName = 'parallel', defaultLeft = 80, defaultRight = 80, defaultTop = 60, diff --git a/en/option/component/title.md b/en/option/component/title.md index 9814f59c..69df32f3 100644 --- a/en/option/component/title.md +++ b/en/option/component/title.md @@ -113,7 +113,7 @@ Set this to `true` to enable triggering events The gap between the main title and subtitle. {{ use: partial-rect-layout( - componentName = "title " + componentName = "title" ) }} {{ use: partial-component-common-style( diff --git a/en/option/component/visual-map.md b/en/option/component/visual-map.md index f9e09e7b..bb2baf7a 100644 --- a/en/option/component/visual-map.md +++ b/en/option/component/visual-map.md @@ -358,7 +358,7 @@ Define visual channels that will mapped from dataValues that are **out of select See available configurations in [${visualMapName}.inRange](~${visualMapName}.inRange) {{ use: partial-rect-layout( - componentName = "visualMap ", + componentName = "visualMap", defaultZ = "4", defaultLeft = "0", defaultRight = "auto", diff --git a/en/option/partial/rect-layout-width-height.md b/en/option/partial/rect-layout-width-height.md index b47290d2..78fc65de 100644 --- a/en/option/partial/rect-layout-width-height.md +++ b/en/option/partial/rect-layout-width-height.md @@ -1,8 +1,14 @@ {{ target: partial-rect-layout-width-height }} +{{ if: ${hostName} }} +{{ var: hostNameStr = ${hostName} }} +{{ else }} +{{ var: hostNameStr = ${componentName} + ' component' }} +{{ /if }} + {{ use: partial-rect-layout( - componentName = ${componentName}, + hostName = ${hostName}, defaultLeft = ${defaultLeft}, defaultTop = ${defaultTop}, defaultRight = ${defaultRight}, @@ -11,9 +17,9 @@ ## width(string|number) = ${defaultWidth|default("'auto'")} -Width of ${componentName} component. {{ if: !${defaultWidth} }}Adaptive by default.{{ /if }} +Width of ${hostNameStr}. {{ if: !${defaultWidth} }}Adaptive by default.{{ /if }} ## height(string|number) = ${defaultHeight|default("'auto'")} -Height of ${componentName} component. {{ if: !${defaultHeight} }}Adaptive by default.{{ /if }} +Height of ${hostNameStr}. {{ if: !${defaultHeight} }}Adaptive by default.{{ /if }} diff --git a/en/option/partial/rect-layout.md b/en/option/partial/rect-layout.md index 3f9e0728..c0c70501 100644 --- a/en/option/partial/rect-layout.md +++ b/en/option/partial/rect-layout.md @@ -1,6 +1,12 @@ {{ target: partial-rect-layout }} +{{ if: ${hostName} }} +{{ var: hostNameStr = ${hostName} }} +{{ else }} +{{ var: hostNameStr = ${componentName} + ' component' }} +{{ /if }} + {{ if: !${noZ} }} {{ use: partial-z-zlevel( prefix = ${prefix}, @@ -11,7 +17,7 @@ #${prefix|default("#")} left(string|number) = ${defaultLeft|default("'auto'")} -Distance between ${componentName} component and the left side of the container. +Distance between ${hostNameStr} and the left side of the container. `left` can be a pixel value like `20`; it can also be a percentage value relative to container width like `'20%'`; and it can also be `'left'`, `'center'`, or `'right'`. @@ -19,7 +25,7 @@ If the `left` value is set to be `'left'`, `'center'`, or `'right'`, then the co #${prefix|default("#")} top(string|number) = ${defaultTop|default("'auto'")} -Distance between ${componentName} component and the top side of the container. +Distance between ${hostNameStr} and the top side of the container. `top` can be a pixel value like `20`; it can also be a percentage value relative to container width like `'20%'`; and it can also be `'top'`, `'middle'`, or `'bottom'`. @@ -27,7 +33,7 @@ If the `top` value is set to be `'top'`, `'middle'`, or `'bottom'`, then the com #${prefix|default("#")} right(string|number) = ${defaultRight|default("'auto'")} -Distance between ${componentName} component and the right side of the container. +Distance between ${hostNameStr} and the right side of the container. `right` can be a pixel value like `20`; it can also be a percentage value relative to container width like `'20%'`. @@ -35,7 +41,7 @@ Distance between ${componentName} component and the right side of the container. #${prefix|default("#")} bottom(string|number) = ${defaultBottom|default("'auto'")} -Distance between ${componentName} component and the bottom side of the container. +Distance between ${hostNameStr} and the bottom side of the container. `bottom` can be a pixel value like `20`; it can also be a percentage value relative to container width like `'20%'`. diff --git a/en/option/series/funnel.md b/en/option/series/funnel.md index b6cba321..143fa1c8 100644 --- a/en/option/series/funnel.md +++ b/en/option/series/funnel.md @@ -167,7 +167,7 @@ Configurations of select state. Available when [selectedMode](~series-funnel.sel ) }} {{ use: partial-rect-layout-width-height( - componentName = "Funnel", + componentName = "funnel", defaultLeft = 80, defaultTop = 60, defaultRight = 80, diff --git a/en/option/series/graph.md b/en/option/series/graph.md index d15ecf6d..0e335554 100644 --- a/en/option/series/graph.md +++ b/en/option/series/graph.md @@ -596,6 +596,7 @@ Alias of [links](~series-graph.links) ) }} {{ use: partial-rect-layout-width-height( + hostName = "graph series", defaultLeft = "'center'", defaultTop = "'middle'", defaultWidth = 'auto', diff --git a/en/option/series/pie.md b/en/option/series/pie.md index 92231986..140a04e8 100644 --- a/en/option/series/pie.md +++ b/en/option/series/pie.md @@ -124,7 +124,7 @@ The precision of the percentage value. The default value is `2`. {{ use: partial-cursor() }} {{ use: partial-rect-layout-width-height( - componentName = "pie chart", + hostName = "pie series", defaultLeft = 0, defaultTop = 0, defaultRight = 0, diff --git a/en/option/series/sankey.md b/en/option/series/sankey.md index 5f46a071..4ad79a43 100644 --- a/en/option/series/sankey.md +++ b/en/option/series/sankey.md @@ -27,7 +27,7 @@ In addition, the edge between two small rectangles in the diagram encodes the `l {{ use: partial-series-name() }} {{ use: partial-rect-layout-width-height( - componentName = 'sankey', + hostName = 'sankey series', defaultLeft = '5%', defaultRight = '20%', defaultTop = '5%', diff --git a/en/option/series/themeRiver.md b/en/option/series/themeRiver.md index 85c236ea..fde8ec7a 100644 --- a/en/option/series/themeRiver.md +++ b/en/option/series/themeRiver.md @@ -32,7 +32,7 @@ What's more, the time attribute of the orinigal dataset would map to a single ti ) }} {{ use: partial-rect-layout-width-height( - componentName = 'thmemRiver', + hostName = 'themeRiver series', defaultLeft = '5%', defaultRight = '5%', defaultTop = '5%', diff --git a/en/option/series/tree.md b/en/option/series/tree.md index 1ab9040e..2767600f 100644 --- a/en/option/series/tree.md +++ b/en/option/series/tree.md @@ -26,7 +26,7 @@ The tree diagram is mainly used to visualize the tree data structure, which is a {{ use: partial-series-name() }} {{ use: partial-rect-layout-width-height( - componentName = 'tree', + hostName = 'tree series', defaultLeft = '12%', defaultRight = '12%', defaultTop = '12%', diff --git a/en/option/series/treemap.md b/en/option/series/treemap.md index 3fecdd39..47885af7 100644 --- a/en/option/series/treemap.md +++ b/en/option/series/treemap.md @@ -50,7 +50,7 @@ Notice: There are some difference in treemap configuration between ECharts3 and {{ use: partial-series-name() }} {{ use: partial-rect-layout-width-height( - componentName = 'treemap ', + hostName = 'treemap series', defaultLeft = 'center', defaultRight = null, defaultTop = 'middle', @@ -133,7 +133,7 @@ To show the path of the current node. Whether to show the breadcrumb. {{ use: partial-rect-layout( - componentName = "breadcrumb ", + hostName = "breadcrumb", prefix = "##", noZ = true, defaultLeft = "'center'", diff --git a/zh/option/component/calendar.md b/zh/option/component/calendar.md index 224312e8..8997b64f 100644 --- a/zh/option/component/calendar.md +++ b/zh/option/component/calendar.md @@ -98,7 +98,7 @@ const option = { ) }} {{ use: partial-rect-layout-width-height( - componentName = "calendar", + componentName = "日历(calendar)", defaultLeft = "80", defaultTop = "60" ) }} diff --git a/zh/option/component/legend.md b/zh/option/component/legend.md index 7e7e7da9..998c095e 100644 --- a/zh/option/component/legend.md +++ b/zh/option/component/legend.md @@ -129,7 +129,7 @@ const option = { <ExampleUIControlBoolean default="true" /> {{ use: partial-rect-layout-width-height( - componentName = "图例" + componentName = "图例(legend)" ) }} ## orient(string) = 'horizontal' diff --git a/zh/option/component/matrix.md b/zh/option/component/matrix.md index 2fd63249..c6a57b8d 100644 --- a/zh/option/component/matrix.md +++ b/zh/option/component/matrix.md @@ -36,7 +36,7 @@ ) }} {{ use: partial-rect-layout-width-height( - componentName = "matrix", + componentName = "矩阵坐标系(matrix)", defaultLeft = "10%", defaultTop = "10%" ) }} diff --git a/zh/option/component/parallel.md b/zh/option/component/parallel.md index c04ad470..97e15d65 100644 --- a/zh/option/component/parallel.md +++ b/zh/option/component/parallel.md @@ -445,7 +445,7 @@ const option = { ) }} {{ use: partial-rect-layout-width-height( - componentName = 'parallel ', + componentName = '平行坐标系(parallel)', defaultLeft = 80, defaultRight = 80, defaultTop = 60, diff --git a/zh/option/component/single-axis.md b/zh/option/component/single-axis.md index 196e0c8b..2acefee0 100644 --- a/zh/option/component/single-axis.md +++ b/zh/option/component/single-axis.md @@ -12,7 +12,7 @@ ) }} {{ use: partial-rect-layout-width-height( - componentName = "single", + componentName = "单轴(singleAxis)", defaultLeft = "'5%'", defaultTop = "'5%'", defaultRight = "'5%'", diff --git a/zh/option/component/timeline.md b/zh/option/component/timeline.md index 0b6da990..99a961ee 100644 --- a/zh/option/component/timeline.md +++ b/zh/option/component/timeline.md @@ -540,7 +540,7 @@ const option = { 表示『播放』按钮的位置。可选值:`'left'`、`'right'`。 {{ use: partial-rect-layout( - componentName = 'timeline' + componentName = '时间轴(timeline)' ) }} ## padding(number|Array) = 5 diff --git a/zh/option/component/title.md b/zh/option/component/title.md index dffeef3f..5fa0b625 100644 --- a/zh/option/component/title.md +++ b/zh/option/component/title.md @@ -130,7 +130,7 @@ const option = { 主副标题之间的间距。 {{ use: partial-rect-layout( - componentName = "title " + componentName = "标题(title)" ) }} {{ use: partial-component-common-style( diff --git a/zh/option/component/toolbox.md b/zh/option/component/toolbox.md index 03d82ba0..4c199364 100644 --- a/zh/option/component/toolbox.md +++ b/zh/option/component/toolbox.md @@ -560,7 +560,7 @@ feature: { ) }} {{ use: partial-rect-layout-width-height( - componentName = "工具栏" + componentName = "工具栏(toolbox)" ) }} ## tooltip(Object) diff --git a/zh/option/component/visual-map.md b/zh/option/component/visual-map.md index 962cfbe7..15c89b4e 100644 --- a/zh/option/component/visual-map.md +++ b/zh/option/component/visual-map.md @@ -332,7 +332,7 @@ visualMap 组件中,`控制器` 的 `inRange` `outOfRange` 设置。如果没 配置参考 [${visualMapName}.inRange](~${visualMapName}.inRange) {{ use: partial-rect-layout( - componentName = "visualMap ", + componentName = "视觉映射(visualMap)", defaultZ = "4", defaultLeft = "0", defaultRight = "auto", diff --git a/zh/option/partial/rect-layout-width-height.md b/zh/option/partial/rect-layout-width-height.md index 6bdc7390..becf82c1 100644 --- a/zh/option/partial/rect-layout-width-height.md +++ b/zh/option/partial/rect-layout-width-height.md @@ -1,8 +1,14 @@ {{ target: partial-rect-layout-width-height }} +{{ if: ${hostName} }} +{{ var: hostNameStr = ${hostName} }} +{{ else }} +{{ var: hostNameStr = ${componentName} + '组件' }} +{{ /if }} + {{ use: partial-rect-layout( - componentName = ${componentName}, + hostName = ${hostName}, defaultLeft = ${defaultLeft}, defaultTop = ${defaultTop}, defaultRight = ${defaultRight}, @@ -13,11 +19,11 @@ <ExampleUIControlPercent default="50%"/> -${componentName}组件的宽度。{{ if: !${defaultWidth} }}默认自适应。{{ /if }} +${hostNameStr}的宽度。{{ if: !${defaultWidth} }}默认自适应。{{ /if }} ## height(string|number) = ${defaultHeight|default("'auto'")} <ExampleUIControlPercent default="50%"/> -${componentName}组件的高度。{{ if: !${defaultHeight} }}默认自适应。{{ /if }} +${hostNameStr}的高度。{{ if: !${defaultHeight} }}默认自适应。{{ /if }} diff --git a/zh/option/partial/rect-layout.md b/zh/option/partial/rect-layout.md index d62c5dd6..1b58267e 100644 --- a/zh/option/partial/rect-layout.md +++ b/zh/option/partial/rect-layout.md @@ -1,6 +1,12 @@ {{ target: partial-rect-layout }} +{{ if: ${hostName} }} +{{ var: hostNameStr = ${hostName} }} +{{ else }} +{{ var: hostNameStr = ${componentName} + '组件' }} +{{ /if }} + {{ if: !${noZ} }} {{ use: partial-z-zlevel( prefix = ${prefix}, @@ -13,7 +19,7 @@ <ExampleUIControlPercent default="0%"/> -${componentName}组件离容器左侧的距离。 +${hostNameStr}离容器左侧的距离。 `left` 的值可以是像 `20` 这样的具体像素值,可以是像 `'20%'` 这样相对于容器高宽的百分比,也可以是 `'left'`, `'center'`, `'right'`。 @@ -23,7 +29,7 @@ ${componentName}组件离容器左侧的距离。 <ExampleUIControlPercent default="0%"/> -${componentName}组件离容器上侧的距离。 +${hostNameStr}离容器上侧的距离。 `top` 的值可以是像 `20` 这样的具体像素值,可以是像 `'20%'` 这样相对于容器高宽的百分比,也可以是 `'top'`, `'middle'`, `'bottom'`。 @@ -33,7 +39,7 @@ ${componentName}组件离容器上侧的距离。 <ExampleUIControlPercent default="0%"/> -${componentName}组件离容器右侧的距离。 +${hostNameStr}离容器右侧的距离。 `right` 的值可以是像 `20` 这样的具体像素值,可以是像 `'20%'` 这样相对于容器高宽的百分比。 @@ -43,7 +49,7 @@ ${componentName}组件离容器右侧的距离。 <ExampleUIControlPercent default="0%"/> -${componentName}组件离容器下侧的距离。 +${hostNameStr}离容器下侧的距离。 bottom 的值可以是像 `20` 这样的具体像素值,可以是像 `'20%'` 这样相对于容器高宽的百分比。 diff --git a/zh/option/series/funnel.md b/zh/option/series/funnel.md index fb2a0e3f..f7262bc6 100644 --- a/zh/option/series/funnel.md +++ b/zh/option/series/funnel.md @@ -189,7 +189,7 @@ option = { ) }} {{ use: partial-rect-layout-width-height( - componentName = "漏斗图", + hostName = "漏斗图系列(funnel series)", defaultLeft = 80, defaultTop = 60, defaultRight = 80, diff --git a/zh/option/series/graph.md b/zh/option/series/graph.md index 11af225c..f7ebb50b 100644 --- a/zh/option/series/graph.md +++ b/zh/option/series/graph.md @@ -604,6 +604,7 @@ links: [{ ) }} {{ use: partial-rect-layout-width-height( + hostName = "关系图系列(graph series)", defaultLeft = "'center'", defaultTop = "'middle'", defaultWidth = '自适应', diff --git a/zh/option/series/pie.md b/zh/option/series/pie.md index aff226e2..d3291174 100644 --- a/zh/option/series/pie.md +++ b/zh/option/series/pie.md @@ -147,7 +147,7 @@ const option = { {{ use: partial-cursor() }} {{ use: partial-rect-layout-width-height( - componentName = "pie chart", + hostName = "饼图系列(pie series)", defaultLeft = 0, defaultTop = 0, defaultRight = 0, diff --git a/zh/option/series/sankey.md b/zh/option/series/sankey.md index 240dc324..4caf5be7 100644 --- a/zh/option/series/sankey.md +++ b/zh/option/series/sankey.md @@ -36,7 +36,7 @@ const option = {"tooltip":{"trigger":"item","triggerOn":"mousemove"},"series":[{ {{ use: partial-series-name() }} {{ use: partial-rect-layout-width-height( - componentName = 'sankey', + hostName = '桑基图系列(sankey series)', defaultLeft = '5%', defaultRight = '20%', defaultTop = '5%', diff --git a/zh/option/series/themeRiver.md b/zh/option/series/themeRiver.md index 48573a34..7a8c2d5d 100644 --- a/zh/option/series/themeRiver.md +++ b/zh/option/series/themeRiver.md @@ -105,7 +105,7 @@ const option = { ) }} {{ use: partial-rect-layout-width-height( - componentName = 'thmemRiver', + hostName = '主题河流图系列(themeRiver series)', defaultLeft = '5%', defaultRight = '5%', defaultTop = '5%', diff --git a/zh/option/series/tree.md b/zh/option/series/tree.md index fd3f3fb1..25052247 100644 --- a/zh/option/series/tree.md +++ b/zh/option/series/tree.md @@ -69,7 +69,7 @@ const option = { {{ use: partial-series-name() }} {{ use: partial-rect-layout-width-height( - componentName = 'tree', + hostName = '树图系列(tree series)', defaultLeft = '12%', defaultRight = '12%', defaultTop = '12%', diff --git a/zh/option/series/treemap.md b/zh/option/series/treemap.md index b3978271..1339b292 100644 --- a/zh/option/series/treemap.md +++ b/zh/option/series/treemap.md @@ -203,7 +203,7 @@ const option = { {{ use: partial-series-name() }} {{ use: partial-rect-layout-width-height( - componentName = 'treemap ', + hostName = '矩形树图系列(treemap series)', defaultLeft = 'center', defaultRight = null, defaultTop = 'middle', @@ -290,7 +290,7 @@ const option = { 是否显示面包屑。 {{ use: partial-rect-layout( - componentName = "面包屑", + hostName = "面包屑(breadcrumb)", prefix = "##", noZ = true, defaultLeft = "'center'", --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
