svelte-gantt
svelte-gantt copied to clipboard
Reset or Clear GanttChart
if chart get wrong timeformat in from, to , tasks, chart explode. after that, even though I have pushed correct data into options and executed chart. it didn't work properly.
reloading page is only way to reset chart.
I'm using vue. so I want to reset chart when components were destroyed. Is there any way to reset or clear chart without reloading or closing page?
Well in vue you can force a rerender of a component like this
<template>
<MyComponent :key="componentKey" />
</template>
<script>
...
data() {
return {
componentKey: 0,
}
},
methods: {
rerender() {
this.componentKey++;
},
}
...
</script>
but ganttChart does not used as components in vue. although I did re-render wrapper div, chart was not fixed. i hope there are methods to reset chart or ways to re-import index.js