I’m currently using Vuetify with chart.js I tried to implement a chart.js inside a v-expansion-panel :
<v-expansion-panels class="my-4" variant="popout">
<v-expansion-panel title="Item">
<v-expansion-panel-text>
<TrajectoryChart :trajectory="coloredLines"></TrajectoryChart>
</v-expansion-panel-text>
</v-expansion-panel>
</v-expansion-panels>
But both animations are not working good together, I would like both animations working smoothly without any latency. I would like to change v-expansion-panel animation’s behavior to not wait for his content to load to expand
I’ve added a timeout to display my graph after 300ms which remove the latency
<template>
<div v-if="showChart" id="chart-container" class="rounded pa-2 w-100">
<canvas ref="chartCanvas"></canvas>
</div>
<div id="chart-container-substitute"></div>
</template>
...
onMounted(async () => {
showChart.value = true;
await nextTick();
setTimeout(() => {
createChart();
}, 300);
});
But the expansion is still done in two times but instead of this mini-useless first expansion :
First useless expansion animation
I would prefer that the expansion is done completly in one time.
Any idea how to solve this ?