From edeb65b533ffcb6dfa3d84c7f10f0c92e9c8a2db Mon Sep 17 00:00:00 2001 From: deft Date: Fri, 10 May 2024 15:46:04 +0800 Subject: [PATCH 1/2] doc(sankey): add doc for sankey itemStyle.borderRadius --- en/option/partial/item-style.md | 9 ++++++++- en/option/series/sankey.md | 5 +++-- zh/option/partial/item-style.md | 9 ++++++++- zh/option/series/sankey.md | 3 ++- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/en/option/partial/item-style.md b/en/option/partial/item-style.md index 2847f28c..fc68002c 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/series/sankey.md b/en/option/series/sankey.md index c7dcf651..616f9af5 100644 --- a/en/option/series/sankey.md +++ b/en/option/series/sankey.md @@ -202,7 +202,8 @@ The style of node rectangle in Sankey diagram. useColorPalatte = true, defaultBorderWidth = 1, defaultBorderColor = "'#aaa'", - useDecal = true + useDecal = true, + hasBorderRadius = true, ) }} ## lineStyle(Object) @@ -541,7 +542,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/zh/option/partial/item-style.md b/zh/option/partial/item-style.md index 5baa688f..0c1d34f1 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/series/sankey.md b/zh/option/series/sankey.md index 1590201f..cf5a2a56 100644 --- a/zh/option/series/sankey.md +++ b/zh/option/series/sankey.md @@ -205,7 +205,8 @@ levels: [{ useColorPalatte = true, defaultBorderWidth = 1, defaultBorderColor = "'#aaa'", - useDecal = true + useDecal = true, + hasBorderRadius = true ) }} ## lineStyle(Object) From 3dfb431470ed556b48c0613bb6ebdfcfb8fe8c5e Mon Sep 17 00:00:00 2001 From: plainheart Date: Tue, 18 Jun 2024 15:21:13 +0800 Subject: [PATCH 2/2] tweak doc for `sankey.itemStyle.borderRadius` --- en/option/partial/item-style.md | 8 -------- en/option/series/sankey.md | 35 ++++++++++++++++++++++++--------- zh/option/partial/item-style.md | 8 -------- zh/option/series/sankey.md | 35 ++++++++++++++++++++++++--------- 4 files changed, 52 insertions(+), 34 deletions(-) diff --git a/en/option/partial/item-style.md b/en/option/partial/item-style.md index fc68002c..329085bb 100644 --- a/en/option/partial/item-style.md +++ b/en/option/partial/item-style.md @@ -48,14 +48,6 @@ ${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}, diff --git a/en/option/series/sankey.md b/en/option/series/sankey.md index 616f9af5..e4db3567 100644 --- a/en/option/series/sankey.md +++ b/en/option/series/sankey.md @@ -201,9 +201,13 @@ The style of node rectangle in Sankey diagram. prefix = "##", useColorPalatte = true, defaultBorderWidth = 1, - defaultBorderColor = "'#aaa'", - useDecal = true, - hasBorderRadius = true, + defaultBorderColor = "'none'", + useDecal = true +) }} + +{{ use: partial-border-radius( + prefix = "##", + version = "5.5.1" ) }} ## lineStyle(Object) @@ -303,7 +307,14 @@ The style of this node. {{ use: partial-item-style( prefix = "###", useColorPalatte = true, - useDecal = true + useDecal = true, + defaultBorderWidth = 1, + defaultBorderColor = "'none'" +) }} + +{{ use: partial-border-radius( + prefix = "###", + version = "5.5.1" ) }} ### label(Object) @@ -444,7 +455,7 @@ Equals to [links](~series-sankey.links) {{ target: partial-sankey-line-style }} -#${prefix} color(Color) = "'#314656'" +#${prefix} color(Color) = '#314656' The color of the edge in Sankey diagram. @@ -481,7 +492,9 @@ The curveness of the edge in Sankey diagram. {{ use: partial-item-style( prefix = "#" + ${prefix}, useDecal = true, - hasInherit = ${state} === 'emphasis' + hasInherit = ${state} === 'emphasis', + defaultBorderColor = ${state} === 'select' ? "'#212121'" : "'none'", + defaultBorderWidth = 1 ) }} @@ -505,14 +518,17 @@ The curveness of the edge in Sankey diagram. {{ use: partial-item-style( prefix = "#" + ${prefix}, - hasInherit = ${state} === 'emphasis' + hasInherit = ${state} === 'emphasis', + defaultBorderColor = ${state} === 'select' ? "'#212121'" : "'none'", + defaultBorderWidth = 1 ) }} #${prefix} lineStyle(Object) {{ use: partial-sankey-line-style( prefix = "#" + ${prefix}, - hasInherit = ${state} === 'emphasis' + hasInherit = ${state} === 'emphasis', + defaultOpacity = ${state} === 'emphasis' ? 0.5 : null ) }} @@ -531,7 +547,8 @@ The line style of edge. {{ use: partial-sankey-line-style( prefix = "#" + ${prefix}, - hasInherit = ${state} === 'emphasis' + hasInherit = ${state} === 'emphasis', + defaultOpacity = ${state} === 'emphasis' ? 0.5 : null ) }} diff --git a/zh/option/partial/item-style.md b/zh/option/partial/item-style.md index 0c1d34f1..be4c5432 100644 --- a/zh/option/partial/item-style.md +++ b/zh/option/partial/item-style.md @@ -46,14 +46,6 @@ ${defaultBorderWidthDesc|default((${name} ? ${name} : "") + "描边线宽。为 defaultMiterLimit = ${defaultMiterLimit} ) }} -{{ if: ${hasBorderRadius} }} - -{{ use: partial-border-radius( - prefix = "##" -) }} - -{{ /if }} - {{ use: partial-style-shadow-opacity( prefix = ${prefix}, defaultOpacity = ${defaultOpacity}, diff --git a/zh/option/series/sankey.md b/zh/option/series/sankey.md index cf5a2a56..4365d87d 100644 --- a/zh/option/series/sankey.md +++ b/zh/option/series/sankey.md @@ -204,9 +204,13 @@ levels: [{ prefix = "##", useColorPalatte = true, defaultBorderWidth = 1, - defaultBorderColor = "'#aaa'", - useDecal = true, - hasBorderRadius = true + defaultBorderColor = "'none'", + useDecal = true +) }} + +{{ use: partial-border-radius( + prefix = "##", + version = "5.5.1" ) }} ## lineStyle(Object) @@ -306,7 +310,14 @@ data: [{ {{ use: partial-item-style( prefix = "###", useColorPalatte = true, - useDecal = true + useDecal = true, + defaultBorderWidth = 1, + defaultBorderColor = "'none'" +) }} + +{{ use: partial-border-radius( + prefix = "###", + version = "5.5.1" ) }} ### label(Object) @@ -455,7 +466,7 @@ links: [{ + `'target'`: 使用目标节点颜色。 + `'gradient'`: 以源节点和目标节点的颜色做一个渐变过渡色。(从 v5.0.0 开始支持) -#${prefix} opacity(number) = 0.2 +#${prefix} opacity(number) = ${defaultOpacity|default(0.2)} 桑基图边的透明度。 @@ -484,7 +495,9 @@ links: [{ {{ use: partial-item-style( prefix = "#" + ${prefix}, useDecal = true, - hasInherit = ${state} === 'emphasis' + hasInherit = ${state} === 'emphasis', + defaultBorderColor = ${state} === 'select' ? "'#212121'" : "'none'", + defaultBorderWidth = 1 ) }} @@ -508,14 +521,17 @@ links: [{ {{ use: partial-item-style( prefix = "#" + ${prefix}, - hasInherit = ${state} === 'emphasis' + hasInherit = ${state} === 'emphasis', + defaultBorderColor = ${state} === 'select' ? "'#212121'" : "'none'", + defaultBorderWidth = 1 ) }} #${prefix} lineStyle(Object) {{ use: partial-sankey-line-style( prefix = "#" + ${prefix}, - hasInherit = ${state} === 'emphasis' + hasInherit = ${state} === 'emphasis', + defaultOpacity = ${state} === 'emphasis' ? 0.5 : null ) }} @@ -534,7 +550,8 @@ links: [{ {{ use: partial-sankey-line-style( prefix = "#" + ${prefix}, - hasInherit = ${state} === 'emphasis' + hasInherit = ${state} === 'emphasis', + defaultOpacity = ${state} === 'emphasis' ? 0.5 : null ) }}