vue-gantt-schedule-timeline-calendar
vue-gantt-schedule-timeline-calendar copied to clipboard
setting config in mounted() breaks chart
Hi,
Changing the example at https://github.com/neuronetio/vue-gantt-schedule-timeline-calendar
to set config in mounted() instead of providing initial value in data() breaks the chart -- it's completely empty:
Change in code from provided example:
data() {
return {
config: {} //empty initially
}
},
mounted() {
this.config = {
height: 300,
list: {
...
//exactly the same values as in your example
}
The watch is triggered correctly, since rows are showing, but the chart part is broken.
+1, i am facing the same problem
+1
Probably related: setting chart items resets time from/to
Use case: change time from/to to another period, load different chart items
this.config.chart.items = new_items;
will reset time to the initial values.
You can load the setting config
in the created
method
The bug is deeper. If one wants to change the rows to some other values, the new rows are added to old ones. Even setting list.rows = {}
doesn't clear the old values.
Will search for other solutions, this is way too buggy and without support.
I would say "setting the config after initial creation" breaks the chart. I am loading my data from a server on created/mounted and after retrieval create the config. It doesn't matter if I create the whole config or just the rows/items, the chart is always empty (except for the rows) ... Who uses static data on initial creation? This totaly beats the purpose of this component.
does anybody found a workaround for this?