novus / nvd3

A reusable charting library written in d3.js
http://nvd3.org/
Other
7.22k stars 2.14k forks source link

renderEnd not firing on chart.update #1667

Open laxu opened 8 years ago

laxu commented 8 years ago

I've experienced this with multiBarChart and multiBarHorizontalChart. The renderEnd event fires when the chart is created, but not when the chart is updated by calling chart.update() for example when resizing the browser window.

The workaround I've used to get around this is to fire a timeout equal to chart.duration() in the window resize function and then do whatever I need to do after renderEnd.

renderEnd also doesn't seem to fire when enabling a series by clicking the series name in the legend. It fires when you disable a series but not when turning it back on.

Using 1.8.3 version.

cdunlap commented 8 years ago

Same behavior, same chart types, v1.8.2. This is causing problems for me especially when enabling/disabling series. I've got label wrapping logic attached to the renderEnd event, but because the chart recreates the markup but doesn't fire these events, the labels don't end up getting wrapped.

I haven't found a good workaround for this yet. Any suggestions would be appreciated.

mpetkov commented 8 years ago

Any timeline on this issue? Same happens when window is resized.

Marco-Sulla commented 5 years ago

Same issue here. I have 8 graphs and "renderEnd" is fired only for two graphs. If I resize the window, other graphs fires renderEnd, since I added nv.utils.windowResize(chart.update), and so on. So it seems the event is fired randomly....

jacquie commented 5 years ago

I am trying to do the same label wrapping logic as @cdunlap above and still experiencing the exact same problem

Marco-Sulla commented 5 years ago

Can someone please reply?