Skip to content

Commit 3b26614

Browse files
committed
add emphasis.disabled, select.disabled. selectedMode: series
apache/echarts#16368 apache/echarts#15534
1 parent e19d251 commit 3b26614

61 files changed

Lines changed: 904 additions & 16 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

en/option/component/geo-common.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ Area filling color.
180180

181181
Map area style in highlighted state.
182182

183+
{{ use: partial-emphasis-disabled(
184+
prefix = "#" + ${prefix}
185+
) }}
186+
183187
{{ if: !${inMap} }}
184188
{{ use: partial-focus-blur-scope(
185189
isGeoCoordSys = true
@@ -194,6 +198,10 @@ Map area style in highlighted state.
194198

195199
Map area style in selected state.
196200

201+
{{ use: partial-select-disabled(
202+
prefix = "#" + ${prefix}
203+
) }}
204+
197205
{{ use: partial-geo-common-state(
198206
prefix = '#' + ${prefix}
199207
) }}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
2+
{{ target: partial-emphasis-disabled }}
3+
4+
#${prefix} disabled(boolean)
5+
6+
<ExampleUIControlBoolean default="false" />
7+
8+
Whether to disable the emphasis state.
9+
10+
When emphasis state is disabled. There will be no highlight effect when the mouse hovered the element, tooltip is triggered, or the legend is hovered. It can be used to improve interaction fluency when there are massive graphic elements.
11+
12+
13+
14+
{{ target: partial-focus-blur-scope }}
15+
16+
### focus(string) = 'none'
17+
18+
{{ if: ${isGeoCoordSys} }}
19+
{{ use: partial-version(
20+
version = "5.1.0"
21+
) }}
22+
{{ else }}
23+
{{ use: partial-version(
24+
version = "5.0.0"
25+
) }}
26+
{{ /if }}
27+
28+
When the data is highlighted, whether to fade out of other data to focus the highlighted. The following configurations are supported:
29+
30+
+ `'none'` Do not fade out other data, it's by default.
31+
+ `'self'` Only focus (not fade out) the element of the currently highlighted data.
32+
33+
{{ if: !${isGeoCoordSys} }}
34+
+ `'series'` Focus on all elements of the series which the currently highlighted data belongs to.
35+
{{ /if }}
36+
37+
{{ if: ${isGraph} }}
38+
+ `'adjacency'` Focus on the elements of adjacent nodes and edges in the graph.
39+
40+
{{ elif: ${isTree} }}
41+
+ `'ancestor'` Focus on all ancestor nodes.
42+
+ `'descendant'` Focus on all descendants nodes.
43+
{{ /if }}
44+
45+
**Example: **
46+
47+
{{ if: !${isGeoCoordSys} }}
48+
```js
49+
emphasis: {
50+
focus: 'series',
51+
blurScope: 'coordinateSystem'
52+
}
53+
```
54+
55+
~[600x400](${galleryViewPath}bar-y-category-stack&reset=1&edit=1)
56+
{{ else }}
57+
```js
58+
emphasis: {
59+
focus: 'self'
60+
}
61+
```
62+
63+
~[600x400](${galleryViewPath}geo-organ&reset=1&edit=1)
64+
{{ /if }}
65+
66+
{{ if: !${isGeoCoordSys} }}
67+
### blurScope(string) = 'coordinateSystem'
68+
69+
{{ use: partial-version(
70+
version = "5.0.0"
71+
) }}
72+
73+
The range of fade out when `focus` is enabled. Support the following configurations
74+
75+
+ `'coordinateSystem'`
76+
+ `'series'`
77+
+ `'global'`
78+
{{ /if }}
79+

en/option/partial/mark-area.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ Style of the mark area.
2929

3030
Emphasis status of mark area.
3131

32+
{{ use: partial-emphasis-disabled(
33+
prefix = "##" + ${prefix}
34+
) }}
35+
3236
###${prefix} label(Object)
3337

3438
{{ use: partial-label(
@@ -241,6 +245,10 @@ Label style of start point and end point will be merged together.
241245

242246
#${prefix} emphasis(Object)
243247

248+
{{ use: partial-emphasis-disabled(
249+
prefix = "#" + ${prefix}
250+
) }}
251+
244252
##${prefix} itemStyle(Object)
245253

246254
{{ use: partial-item-style(

en/option/partial/mark-line.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ Mark line style.
4646

4747
Emphasis status of mark line.
4848

49+
{{ use: partial-emphasis-disabled(
50+
prefix = "##" + ${prefix}
51+
) }}
52+
4953
###${prefix} label(Object)
5054

5155
{{ use: mark-line-label(
@@ -339,6 +343,10 @@ Label of this data item, which will be merged with `label` of starting point and
339343

340344
#${prefix} emphasis(Object)
341345

346+
{{ use: partial-emphasis-disabled(
347+
prefix = "#" + ${prefix}
348+
) }}
349+
342350
##${prefix} lineStyle(Object)
343351

344352
{{ use: partial-line-style(

en/option/partial/mark-point.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ Mark point style.
4141

4242
Emphasis status of mark point.
4343

44+
{{ use: partial-emphasis-disabled(
45+
prefix = "##" + ${prefix}
46+
) }}
47+
4448
###${prefix} label(Object)
4549

4650
{{ use: partial-label(
@@ -184,6 +188,10 @@ Mark point style.
184188

185189
###${prefix} emphasis(Object)
186190

191+
{{ use: partial-emphasis-disabled(
192+
prefix = "###" + ${prefix}
193+
) }}
194+
187195
####${prefix} label(Object)
188196

189197
{{ use: partial-label(

en/option/partial/select-common.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
{{ target: partial-select-disabled }}
3+
4+
#${prefix} disabled(boolean)
5+
6+
<ExampleUIControlBoolean default="false" />
7+
8+
If data can be selected. Available when `selectedMode` is used. Can be used to disable selection for part of the data.
9+
10+

en/option/partial/selected-mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
) }}
1010
{{ /if }}
1111

12-
<ExampleUIControlEnum options="false,true,single,multiple" />
12+
<ExampleUIControlEnum options="false,true,single,multiple,series" />
1313

1414
Selected mode. It is enabled by default, and you may set it to be `false` to disabled it.
1515

16-
Besides, it can be set to `'single'` or `'multiple'`, for single selection and multiple selections.
16+
Besides, it can be set to `'single'`, `'multiple'` or `'series'`, for single selection, multiple selections and whole series selection.
1717

en/option/partial/zr-graphic.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,6 +1773,8 @@ x value of element scale and rotation origin. In pixels
17731773
17741774
y value of element scale and rotation origin. In pixels.
17751775
1776+
1777+
17761778
{{ target: partial-graphic-cpt-focus-blur }}
17771779
17781780
##${prefix} focus(string) = 'none'
@@ -1804,6 +1806,10 @@ The range of fade out when `focus` is enabled. Support the following configurati
18041806
{{ target: partial-graphic-cpt-style-emphasis }}
18051807
18061808
{{ if: ${usageType} === 'customSeries' }}
1809+
##${prefix} emphasisEnabled(boolean)
1810+
1811+
Whether to disable the emphasis state.
1812+
18071813
##${prefix} emphasis(Object)
18081814
18091815
Emphasis state of the element.

en/option/series/bar.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ Background style of each bar if [showBackground](~series-bar.showBackground) is
8686

8787
Configurations of emphasis state.
8888

89+
{{ use: partial-emphasis-disabled(
90+
prefix = "##"
91+
) }}
92+
8993
{{ use: partial-focus-blur-scope() }}
9094

9195
{{ use: partial-bar-state(
@@ -106,8 +110,16 @@ Configurations of blur state. Available when [emphasis.focus](~series-bar.emphas
106110

107111
## select(Object)
108112

113+
{{ use: partial-version(
114+
version = "5.0.0"
115+
) }}
116+
109117
Configurations of select state. Available when [selectedMode](~series-bar.selectedMode) is set.
110118

119+
{{ use: partial-select-disabled(
120+
prefix = "##"
121+
) }}
122+
111123
{{ use: partial-bar-state(
112124
prefix = "##",
113125
topLevel = true,
@@ -191,6 +203,10 @@ The value of a single data item.
191203

192204
Emphasis state of single data.
193205

206+
{{ use: partial-emphasis-disabled(
207+
prefix = "###"
208+
) }}
209+
194210
{{ use: partial-bar-state(
195211
prefix = "###",
196212
topLevel = false,
@@ -219,6 +235,10 @@ Blur state of single data.
219235

220236
Select state of single data.
221237

238+
{{ use: partial-select-disabled(
239+
prefix = "###"
240+
) }}
241+
222242
{{ use: partial-bar-state(
223243
prefix = "###",
224244
topLevel = false,

en/option/series/boxplot.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ Style of boxplot.
7777

7878
Configurations of emphasis state.
7979

80+
{{ use: partial-emphasis-disabled(
81+
prefix = "##"
82+
) }}
83+
8084
{{ use: partial-focus-blur-scope() }}
8185

8286
### itemStyle(Object)
@@ -116,6 +120,10 @@ Configurations of blur state. Available when [emphasis.focus](~series-boxplot.em
116120

117121
Configurations of select state. Available when [selectedMode](~series-boxplot.selectedMode) is set.
118122

123+
{{ use: partial-select-disabled(
124+
prefix = "##"
125+
) }}
126+
119127
### itemStyle(Object)
120128

121129
{{ use: partial-item-style(
@@ -198,6 +206,10 @@ Style of a single data.
198206

199207
Emphasis state of a single data.
200208

209+
{{ use: partial-emphasis-disabled(
210+
prefix = "###"
211+
) }}
212+
201213
#### itemStyle(Object)
202214

203215
{{ use: partial-item-style(
@@ -229,6 +241,10 @@ Blur state of single data.
229241

230242
Select state of single data.
231243

244+
{{ use: partial-select-disabled(
245+
prefix = "###"
246+
) }}
247+
232248
#### itemStyle(Object)
233249

234250
{{ use: partial-item-style(

0 commit comments

Comments
 (0)