Commit d09b2786 authored by David Schnur's avatar David Schnur

Allow the pie to redraw on resize or update.

When a pie's labels don't fit within its container, the pie is redrawn
with a smaller radius until the labels fit, or a fixed number of retry
attempts are exhausted. The redraw flag was not reset on success,
however, which prevented the pie from being redrawn again after a resize
or update.
parent 02c701b0
......@@ -318,6 +318,12 @@ More detail and specific examples can be found in the included HTML file.
target.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>");
}
// Reset the redraw flag on success, so the loop above can run
// again in the event of a resize or other update.
// TODO: We should remove this redraw system entirely!
redraw = true;
if (plot.setSeries && plot.insertLegend) {
plot.setSeries(slices);
plot.insertLegend();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment