-
Notifications
You must be signed in to change notification settings - Fork 19.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.0] [FEATURE] Introduce more states in echarts #12925
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…o label/labelStyle
Currently only implemented and tested on bar
Thanks for your contribution! |
1 task
…is state to emphasis state.
100pah
approved these changes
Jul 19, 2020
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[5.0] [FEATURE] Introduce more states in echarts
Brief Information
This pull request introduces more states and user interactions in echarts. Which includes:
blur
andselect
state to all series. These two states have the same styling configuration with the originalemphasis
statehighlightPolicy
,focusNodeAdjacency
.hoverOffset
select
state.Detail Changes
1. Introduce
blur
andselect
state in all series.blur
state is used when other elements fade out during the focus of some elements.select
state is used when some element is selected by click.2. Add
focus
andblurScope
to support focus effect when mouseoverfocus:
focus
defines which elements to keep not being blurred. It can be:In commons series:
'self'
Only the data highlighted.'series'
The whole series which highlighted data belongs to.In the special series:
'adjacency'
Adjacency node and edges in the graph. Available in sankey / graph series. It's same withfocusNodeAdjacency
in 4.0'ancestor' | 'descendant'
Ancestor / Descendant nodes in tree. Available in tree / treemap / sunburst series. It's same withhighlightPolicy
in 4.0blurScope:
blurScope
defines which elements in this scope will be blurred. It can be:'series'
Blur the data in the series which highlighted data belongs to.'coordinateSystem'
Blur the data in the coordinate system which highlighted data belongs to.'global'
Blur all other data.3. Unify different state configurations from 4.0 and provide a more consistent option design.
1)
sunburst
series:downplay
state is replaced byblur
state.highlight
state is removed.highlightPolicy
is replaced byIt's supported in
treemap
andtree
series which uses tree structure data now.2) In
graph
,sankey
series:focusNodeAdjacency
is replaced by:3)
pictorialBar
,scatter
,effectScatter
,line
,pie
,boxplot
,tree
hoverAnimation
is replaced by:hoverOffset
is replaced by:4. Provide data selection ability to all series.
All series can use
selectedMode
option to turn on data selection by click, which is only available in pie and map before.Values supported:
'single'
: Only one data in series can be selected.'multiple'
: Multiple data in series can be selected.true
: Same with'single'
false
: Disable data selection. Which is by default.Data selection action and event
action
event
For example:
Pie and map select action and event in 4.0 has been deprecated, which includes:
actions
pieToggleSelect
,pieSelect
,pieUnSelect
,mapToggleSelect
,mapSelect
,mapUnSelect
events
pieselectchanged
,pieselected
,pieunselected
,mapselectchanged
,mapselected
,mapunselected
,Example of Usage
Blur others when highlighting the hovered data.
Example code:
Select data in bar series.
Selection status will be kept during other user interaction.