We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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.5.1
https://codesandbox.io/p/sandbox/echart-treemap-vue-bug-q74ljp
Click on a node within the treemap OR click on the breadcrumb OR try to zoom with the mouse wheel and the treemap disappears.
A refresh brings it back.
Treemap disappears/minimises to the top left.
Drilldown or zoom change
- OS: Any - Browser: Chrome - Framework: Vue 3
It uses data (data.js) which is the data directly from the disk usage example
The text was updated successfully, but these errors were encountered:
not-a-bug, probably due to error in Vue environment. Same code works fine in the Editor - Demo
Sorry, something went wrong.
@helgasoft just because something works outside of a framework doesn't automatically mean the bug is within the framework.
Are you using the recommended vue-echarts ? There are examples to follow there.
@DotoPototo Try to use shallowRef
shallowRef
- const chart = ref(null); + const chart = shallowRef(null);
Or a local unresponsive variable. (More recommended, as it doesn't really need reactivity)
- const chart = ref(null); + let chart = null const updateChart = () => { - chart.value.setOption({ + chart.setOption({ // ... }) }) onMounted(() => { - chart.value = echarts.init(document.getElementById("main"), "dark"); + chart = echarts.init(document.getElementById("main"), "dark"); updateChart(); }); // Don't forget to dispose the chart instance when the component is destroyed + onBeforeUnmount(() => { + if (chart) { + chart.dispose() + chart = null + } + })
See also other similar issues here, especially #17723 (comment).
No branches or pull requests
Version
5.5.1
Link to Minimal Reproduction
https://codesandbox.io/p/sandbox/echart-treemap-vue-bug-q74ljp
Steps to Reproduce
Click on a node within the treemap OR click on the breadcrumb OR try to zoom with the mouse wheel and the treemap disappears.
A refresh brings it back.
Current Behavior
Treemap disappears/minimises to the top left.
Expected Behavior
Drilldown or zoom change
Environment
Any additional comments?
It uses data (data.js) which is the data directly from the disk usage example
The text was updated successfully, but these errors were encountered: