Commit d0fba4a5 authored by David Schnur's avatar David Schnur

Prevent pie slice outlines from being drawn when the stroke width is zero (issue 585)

parent c5c865d5
...@@ -39,20 +39,29 @@ Bug fixes ...@@ -39,20 +39,29 @@ Bug fixes
- Fix problem with null values and pie plugin (patch by gcruxifix, - Fix problem with null values and pie plugin (patch by gcruxifix,
issue 500). issue 500).
- Fix problem with threshold plugin and bars (based on patch by - Fix problem with threshold plugin and bars (based on patch by
kaarlenkaski, issue 348). kaarlenkaski, issue 348).
- Fix axis box calculations so the boxes include the outermost part of - Fix axis box calculations so the boxes include the outermost part of
the labels too. the labels too.
- Fix problem with event clicking and hovering in IE 8 by updating - Fix problem with event clicking and hovering in IE 8 by updating
Excanvas and removing previous work-around (test case by Ara Excanvas and removing previous work-around (test case by Ara
Anjargolian). Anjargolian).
- Fix issues with blurry 1px border when some measures aren't integer - Fix issues with blurry 1px border when some measures aren't integer
(reported by Ara Anjargolian). (reported by Ara Anjargolian).
- Fix bug with formats in the data processor (reported by Peter Hull, - Fix bug with formats in the data processor (reported by Peter Hull,
issue 534). issue 534).
- Prevent i from being declared global in extractRange (reported by - Prevent i from being declared global in extractRange (reported by
Alexander Obukhov, issue 627). Alexander Obukhov, issue 627).
- Prevent pie slice outlines from being drawn when the stroke width is
zero (reported by Chris Minett, issue 585)
Flot 0.7 Flot 0.7
-------- --------
......
...@@ -347,13 +347,13 @@ More detail and specific examples can be found in the included HTML file. ...@@ -347,13 +347,13 @@ More detail and specific examples can be found in the included HTML file.
function drawPie() function drawPie()
{ {
startAngle = Math.PI*options.series.pie.startAngle; var startAngle = Math.PI * options.series.pie.startAngle;
var radius;
// set radius // set radius
if (options.series.pie.radius>1) if (options.series.pie.radius > 1)
var radius = options.series.pie.radius; radius = options.series.pie.radius;
else else radius = maxRadius * options.series.pie.radius;
var radius = maxRadius * options.series.pie.radius;
// center and rotate to starting position // center and rotate to starting position
ctx.save(); ctx.save();
...@@ -372,12 +372,15 @@ More detail and specific examples can be found in the included HTML file. ...@@ -372,12 +372,15 @@ More detail and specific examples can be found in the included HTML file.
ctx.restore(); ctx.restore();
// draw slice outlines // draw slice outlines
if (options.series.pie.stroke.width > 0) {
ctx.save(); ctx.save();
ctx.lineWidth = options.series.pie.stroke.width; ctx.lineWidth = options.series.pie.stroke.width;
currentAngle = startAngle; currentAngle = startAngle;
for (var i = 0; i < slices.length; ++i) for (var i = 0; i < slices.length; ++i)
drawSlice(slices[i].angle, options.series.pie.stroke.color, false); drawSlice(slices[i].angle, options.series.pie.stroke.color, false);
ctx.restore(); ctx.restore();
}
// draw donut hole // draw donut hole
drawDonutHole(ctx); drawDonutHole(ctx);
......
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