Commit 55864254 authored by David Schnur's avatar David Schnur

Removed unnecessary plugin-global variables.

The canvasWidth, canvasHeight, legendWidth and legendHeight variables
existed only to share data between the setupPie and draw functions.  Now
that setupPie has been folded into draw, they're no longer necessary.
parent 6d70144d
......@@ -68,13 +68,10 @@ More detail and specific examples can be found in the included HTML file.
function init(plot) {
var canvas = null,
canvasWidth = 0,
canvasHeight = 0,
target = null,
maxRadius = null,
centerLeft = null,
centerTop = null,
legendWidth = 0,
processed = false,
raw = false,
ctx = null;
......@@ -268,13 +265,12 @@ More detail and specific examples can be found in the included HTML file.
return; // if no series were passed
}
canvasWidth = plot.getPlaceholder().width();
canvasHeight = plot.getPlaceholder().height();
var canvasWidth = plot.getPlaceholder().width(),
canvasHeight = plot.getPlaceholder().height(),
legendWidth = target.children().filter(".legend").children().width() || 0;
ctx = newCtx;
legendWidth = target.children().filter(".legend").children().width() || 0;
// calculate maximum radius and center point
maxRadius = Math.min(canvasWidth, canvasHeight / options.series.pie.tilt) / 2;
......
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