You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to add a method that will allow the chart values to be updated and for any changes in the bar value to be shown by animating/transitioning to the new value.
I was able to get to the chart to redraw by force removal of the SVG nodes:-
function refreshChart(values, labels) {
if (chart !== undefined) {
chart.data.labels = labels;
chart.data.values = values;
chart.svg.selectAll("*").remove();
chart.drawChart();
}
}
This works but looks a little janky and has downsides such as no longer supporting tooltips, interactive highlight, etc. as the nodes are being recreated:-
It would be awesome if there was a way to update all the options and call refresh()/redraw() and have these changes reflected without having to destroy the SVG nodes:-
I would also like to be able to supply an array of colours for the bar charts similar to what is supported for the pie charts. Supporting only a single colour seems very limiting for such a cool chart.
Thanks
The text was updated successfully, but these errors were encountered:
Hey, thanks for this and the other issues! All are very valuable.
Yes, I agree this is a great idea. I originally stayed away from these features because I wanted the API to be as simple as possible, and e.g. the option to highlight one bar could begin a slow crawl to change that.
I do agree that the animation would look great. I'm pretty tied up this week but will look into it soon, as I think the functionality will really bring things together.
Thanks for the response. I think the animation/refresh will make it AAA+ in terms of visuals and would hopefully only add one more property to the API e.g.
Would it be possible to add a method that will allow the chart values to be updated and for any changes in the bar value to be shown by animating/transitioning to the new value.
I was able to get to the chart to redraw by force removal of the SVG nodes:-
This works but looks a little janky and has downsides such as no longer supporting tooltips, interactive highlight, etc. as the nodes are being recreated:-
It would be awesome if there was a way to update all the options and call refresh()/redraw() and have these changes reflected without having to destroy the SVG nodes:-
I would also like to be able to supply an array of colours for the bar charts similar to what is supported for the pie charts. Supporting only a single colour seems very limiting for such a cool chart.
Thanks
The text was updated successfully, but these errors were encountered: