-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Closed as not planned
Labels
bugenThis issue is in EnglishThis issue is in EnglishstaleInactive for a long time. Will be closed in 7 days.Inactive for a long time. Will be closed in 7 days.waiting-for: community
Description
Version
5.0.0
Steps to reproduce
Use the following where I have setup a custom toolbox feature. After the treemap is rendered, drilldown and then click on the toolbox feature which invokes a trivial setOption. The treemap state is reset.
option = {
toolbox: {
feature: {
myView: {
icon: 'path://M22,7H2V2h20V7z M22,9.5H2v5h20V9.5z M22,17H2v5h20V17z',
onclick: () => myChart.setOption({toolbox: { show:true } })
}
}
},
series: [{
type: 'treemap',
data: [{
name: 'nodeA', // First tree
value: 10,
children: [{
name: 'nodeAa', // First leaf of first tree
value: 4
}, {
name: 'nodeAb', // Second leaf of first tree
value: 6
}]
}, {
name: 'nodeB', // Second tree
value: 20,
children: [{
name: 'nodeBa', // Son of first tree
value: 20,
children: [{
name: 'nodeBa1', // Granson of first tree
value: 20
}]
}]
}]
}]
};
What is expected?
When setOption is used to merge non-state related options, the treemap state shouldn't be reset.
What is actually happening?
The treemap always resets back to the initial state.
Note that it is not required to have a custom toolbox feature. I just gave it for a quick example. In my case, the toolbox is hidden/shown when the mouse enters/leaves the chart.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugenThis issue is in EnglishThis issue is in EnglishstaleInactive for a long time. Will be closed in 7 days.Inactive for a long time. Will be closed in 7 days.waiting-for: community