Open FabianMontoya opened 1 year ago
First I created a chart with empty series and xaxis categories, after a request I update the series and categories:
EX:
chartOptions.value = { ...chartOptions.value, xaxis: { ...chartOptions.value.xaxis, categories: ['Initial', 'Month 1', 'Month 2', 'Month 3', 'Month 4', 'Month 5'] } }; chartData.value[0].data = [80, 70, 65, 60, 55, 50];
And the data only appear, doesn't showing any animation (like when the chart is created as new).
For now, I solved it adding a v-if into the apexchart component:
v-if
apexchart
<apexchart v-if="showChart" type="line" height="100%" :options="chartOptions" :series="chartData" />
And I init it in false, and after I update the values, change it to true:
chartOptions.value = { ...chartOptions.value, xaxis: { ...chartOptions.value.xaxis, categories: ['Initial', 'Month 1', 'Month 2', 'Month 3', 'Month 4', 'Month 5'] } }; chartData.value[0].data = [80, 70, 65, 60, 55, 50]; setTimeout(() => { showChart.value = true; }, 0);
I don't know if it's an error or if I'm doing something wrong.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
First I created a chart with empty series and xaxis categories, after a request I update the series and categories:
EX:
And the data only appear, doesn't showing any animation (like when the chart is created as new).
For now, I solved it adding a
v-if
into theapexchart
component:<apexchart v-if="showChart" type="line" height="100%" :options="chartOptions" :series="chartData" />
And I init it in false, and after I update the values, change it to true:
I don't know if it's an error or if I'm doing something wrong.