Skip to content

Commit 2d81ca1

Browse files
committed
tweak doc for richInheritPlainLabel
1 parent f9a3098 commit 2d81ca1

6 files changed

Lines changed: 31 additions & 12 deletions

File tree

en/option/option.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ Global font style.
122122
defaultFontSize: 12
123123
) }}
124124

125+
{{import: partial-rich-inherit-plain-label}}
126+
125127
{{import: partial-animation }}
126128

127129
# stateAnimation(Object)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{ target: partial-rich-inherit-plain-label }}
2+
3+
#${prefix} richInheritPlainLabel(boolean) = true
4+
5+
{{ use: partial-version(version: '6.0.0') }}
6+
7+
Whether rich text inherits plain text style.
8+
9+
Since v6, the rich text styles (`fontStyle`, `fontWeight`, `fontSize`, `fontFamily`, `textShadowColor`, `textShadowBlur`, `textShadowOffsetX`, `textShadowOffsetY`) inherit the plain text style. To disable this behavior, you can set `richInheritPlainLabel: false` at the root level of an echarts option or the same level of the label style options. See also [#20977](https://github.com/apache/echarts/pull/20977).

en/option/partial/text-style.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,11 @@ For more details, see [Rich Text](tutorial.html#Rich%20Text) please.
109109
prefix = ${prefix} + '##',
110110
enableAutoColor = ${enableAutoColor}
111111
) }}
112-
{{ /if }}
113-
114-
#${prefix} richInheritPlainLabel(boolean) = true
115-
116-
{{ use: partial-version(version: '6.0.0') }}
117112

118-
Whether rich text inherits plain text style.
113+
{{ use: partial-rich-inherit-plain-label(
114+
prefix= ${prefix}
115+
) }}
116+
{{ /if }}
119117

120118
{{ target: partial-text-style-base-item }}
121119

zh/option/option.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,14 @@
114114

115115
# textStyle(Object)
116116
全局的字体样式。
117+
117118
{{ use: partial-simple-text-style(
118119
prefix='#',
119120
defaultFontSize=12
120121
) }}
121122

123+
{{import: partial-rich-inherit-plain-label }}
124+
122125
{{import: partial-animation }}
123126

124127
# stateAnimation(Object)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{ target: partial-rich-inherit-plain-label }}
2+
3+
#${prefix} richInheritPlainLabel(boolean) = true
4+
5+
{{ use: partial-version(version: '6.0.0') }}
6+
7+
富文本样式是否继承普通文本样式。
8+
9+
从 v6 版本开始,标签的富文本部分样式(`fontStyle`, `fontWeight`, `fontSize`, `fontFamily`, `textShadowColor`, `textShadowBlur`, `textShadowOffsetX`, `textShadowOffsetY`)默认继承普通文本样式。你可以设置 `richInheritPlainLabel: false` (可在最外层配置项或与同级文本样式配置项)来禁用此行为。参见 [#20977](https://github.com/apache/echarts/pull/20977)

zh/option/partial/text-style.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,11 @@ label: {
109109
prefix = ${prefix} + '##',
110110
enableAutoColor = ${enableAutoColor}
111111
) }}
112-
{{ /if }}
113-
114-
#${prefix} richInheritPlainLabel(boolean) = true
115-
116-
{{ use: partial-version(version: '6.0.0') }}
117112

118-
富文本样式是否继承普通文本样式。
113+
{{ use: partial-rich-inherit-plain-label(
114+
prefix= ${prefix}
115+
) }}
116+
{{ /if }}
119117

120118
{{ target: partial-text-style-base-item }}
121119

0 commit comments

Comments
 (0)