d3pie icon indicating copy to clipboard operation
d3pie copied to clipboard

pie.redraw() with error

Open tet4enko opened this issue 10 years ago • 2 comments

pie.updateProp("data.content", newItems); + pie.redraw(); or pie.updateProp("size.canvasWidth", newWidth); // using redraw(); -------> Uncaught TypeError: Cannot read property 'value' of undefined

tet4enko avatar Jan 27 '15 10:01 tet4enko

I've actually never been able to call pie.redraw(), even if I don't updateProp call first. Just by creating a simple d3pie with data, and then at a later stage pie.redraw() the Uncaught TypeError: Cannot read property 'value' of undefined error occurs. Seems to happen in j.getSegmentAngle.

The workaround for me has been to not create the pie first followed by a later redraw, but just destroy it and create it again at that later stage.

eithe avatar May 11 '15 07:05 eithe

Also seeing this issue during resize events on this call: this.pieChart.updateProp("size", sizeConfig); I used a debounce to avoid too many updateProps and that avoids the error.

TroyLDay avatar Oct 31 '16 20:10 TroyLDay