Clip the pie center only when using offset auto.

If an explicit numeric offset was provided, we should not override it.
The clipping is only meant to apply to the case where the center is
moved to make room for the legend in 'auto' mode, anyway.
master
David Schnur 13 years ago
parent 3951e0c472
commit 7deacc9ed1

@ -293,16 +293,15 @@ More detail and specific examples can be found in the included HTML file.
} else {
centerLeft -= legendWidth / 2;
}
if (centerLeft < maxRadius) {
centerLeft = maxRadius;
} else if (centerLeft > canvasWidth - maxRadius) {
centerLeft = canvasWidth - maxRadius;
}
} else {
centerLeft += options.series.pie.offset.left;
}
if (centerLeft < maxRadius) {
centerLeft = maxRadius;
} else if (centerLeft > canvasWidth - maxRadius) {
centerLeft = canvasWidth - maxRadius;
}
var slices = plot.getData(),
attempts = 0;

Loading…
Cancel
Save