novus/nvd3

[sunburst] Toggle between modes doesn't work : chart only draw "count" mode

Notmarrco opened this issue · 0 comments

NVD3 version used:

1.8.6

Browser and OS used:

Firefox on ubuntu

Live Example:

https://jsfiddle.net/8sug39wk/32/

Expected Behaviour:

I create a new sunburst chart, with mode value. Then I want to toggle the mode to count, so I call : chart.mode("count"); chart.update(); and the chart is updated accordingly.

If I toggle back to value, then the chart should be drawn again, in the "value" mode.

Present Behaviour:

If the chart is created with mode count, then if I change the mode and update the chart, it is not drawn correctly (the chart is drawn with the "count" mode whereas it's chart.mode() is in fact well changed to value)

If the chart is created with mode value, then the first change to mode count does draw the correct chart, but then any following change in mode is drawn as "count", even if the chart.mode() is "value".

(not very clear, sorry ! but the jsfiddle shows that : just click on "toggle" mode, and nothing will change on the chart as soon as its mode is set to "count")