Commit 7deacc9e authored by David Schnur's avatar David Schnur

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