Reputation: 133
I am trying to update a milestone to a task (and vice-versa). To do so, I update the data and set milestone: true
and even remove the end
just to be safe.
Here you can press the button and the point should visually update (its values do) but it doesn't and I am wondering if I'm doing something wrong or if it is not doable to begging with.
Please note that we get a highcharts-gantt.src.js:48256 Uncaught TypeError: Cannot read property 'animate' of undefined
.
Also, you don't get this error when updating from task to milestone.
I'm assuming this may just have been overlooked by the devs and I can probably get a workaround if I post this as an issue on the repo but maybe I'm just doing this wrong to begin with (in some cases, you aren't supposed to update directly but instead use a setSomething
function).
"
Workaround(s):
When updating point, set marker.symbol = null, demo: https://jsfiddle.net/BlackLabel/oyL24bvq/ Snippet:
chart.series[0].points[0].update({
...
marker: {
symbol: null
}
});
Destroy point.graphic before updating point, demo: https://jsfiddle.net/BlackLabel/35vyhqmz/ Snippet:
chart.series[0].points[0].graphic = chart.series[0].points[0].graphic.destroy();
"
(source: https://github.com/highcharts/highcharts/issues/11158)
Upvotes: 0
Views: 325
Reputation: 133
"
Workaround(s):
When updating point, set marker.symbol = null, demo: https://jsfiddle.net/BlackLabel/oyL24bvq/ Snippet:
chart.series[0].points[0].update({
...
marker: {
symbol: null
}
});
Destroy point.graphic before updating point, demo: https://jsfiddle.net/BlackLabel/35vyhqmz/ Snippet:
chart.series[0].points[0].graphic = chart.series[0].points[0].graphic.destroy();
"
(source: https://github.com/highcharts/highcharts/issues/11158)
Upvotes: 0