Closed TangoPJ closed 1 year ago
Would you be able to post your whole chart and data on CodePen/jsFiddle so that we can test?
@martynasma Thanks for the reply. Please can you open my simple example - https://codesandbox.io/s/serene-cookies-nid1ss?file=/src/components/HelloWorld.vue and once you see the chart - can you uncomment 80-th line and refresh the page? What am I doing wrong?
Thanks. Indeed that looks weird. Must be something related to Vue, as I can't reproduce this outside of Vue.
We will take a stab at figuring it out.
@TangoPJ You need to follow our Vue tutorial correctly:
mounted()
instead of setup()
beforeUnmount()
this.$refs.chartdiv
instead of creating a new shallowRef
ref
, you must either use shallowRef
or a regular property (like this.chart
)Here is a working codesandbox: https://codesandbox.io/s/naughty-phoebe-1fdnp1?file=/src/components/HelloWorld.vue
@Pauan Thank you, but I'm using composition API, I should use setup() in my code and there is not this
keyword in the composition API, an alternative way to use this.$refs
in the composition API we should create constant as a shallowRef
P.s. @Pauan I solved my problem by separating labels and charts into different divs as described here - https://github.com/amcharts/amcharts4/issues/4189
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Hello! :wave: To create the pie chart I'm using Vue 3, composition API. I dynamically add the data to chart.value.data using my custom function getReport(). And my code looks like this:
:metal: It works:
:interrobang: But if I get more projects it increases the number of legends I get this bug:
How can I solve this problem? I need to save the size of chart constantly
I tried to divide the chart and legends in two different divs, but my browser crashes when I add this line of the code:
Thank you :pray: