Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
F
flot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HS-public
flot
Commits
d0fba4a5
Commit
d0fba4a5
authored
May 02, 2012
by
David Schnur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent pie slice outlines from being drawn when the stroke width is zero (issue 585)
parent
c5c865d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
19 deletions
+31
-19
NEWS.txt
NEWS.txt
+9
-0
jquery.flot.pie.js
jquery.flot.pie.js
+22
-19
No files found.
NEWS.txt
View file @
d0fba4a5
...
...
@@ -39,20 +39,29 @@ Bug fixes
- Fix problem with null values and pie plugin (patch by gcruxifix,
issue 500).
- Fix problem with threshold plugin and bars (based on patch by
kaarlenkaski, issue 348).
- Fix axis box calculations so the boxes include the outermost part of
the labels too.
- Fix problem with event clicking and hovering in IE 8 by updating
Excanvas and removing previous work-around (test case by Ara
Anjargolian).
- Fix issues with blurry 1px border when some measures aren't integer
(reported by Ara Anjargolian).
- Fix bug with formats in the data processor (reported by Peter Hull,
issue 534).
- Prevent i from being declared global in extractRange (reported by
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
--------
...
...
jquery.flot.pie.js
View file @
d0fba4a5
...
...
@@ -347,20 +347,20 @@ More detail and specific examples can be found in the included HTML file.
function
drawPie
()
{
startAngle
=
Math
.
PI
*
options
.
series
.
pie
.
startAngle
;
var
startAngle
=
Math
.
PI
*
options
.
series
.
pie
.
startAngle
;
var
radius
;
// set radius
if
(
options
.
series
.
pie
.
radius
>
1
)
var
radius
=
options
.
series
.
pie
.
radius
;
else
var
radius
=
maxRadius
*
options
.
series
.
pie
.
radius
;
if
(
options
.
series
.
pie
.
radius
>
1
)
radius
=
options
.
series
.
pie
.
radius
;
else
radius
=
maxRadius
*
options
.
series
.
pie
.
radius
;
// center and rotate to starting position
ctx
.
save
();
ctx
.
translate
(
centerLeft
,
centerTop
);
ctx
.
scale
(
1
,
options
.
series
.
pie
.
tilt
);
//ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera
// draw slices
ctx
.
save
();
var
currentAngle
=
startAngle
;
...
...
@@ -370,25 +370,28 @@ More detail and specific examples can be found in the included HTML file.
drawSlice
(
slices
[
i
].
angle
,
slices
[
i
].
color
,
true
);
}
ctx
.
restore
();
// draw slice outlines
ctx
.
save
();
ctx
.
lineWidth
=
options
.
series
.
pie
.
stroke
.
width
;
currentAngle
=
startAngle
;
for
(
var
i
=
0
;
i
<
slices
.
length
;
++
i
)
drawSlice
(
slices
[
i
].
angle
,
options
.
series
.
pie
.
stroke
.
color
,
false
);
ctx
.
restore
();
if
(
options
.
series
.
pie
.
stroke
.
width
>
0
)
{
ctx
.
save
();
ctx
.
lineWidth
=
options
.
series
.
pie
.
stroke
.
width
;
currentAngle
=
startAngle
;
for
(
var
i
=
0
;
i
<
slices
.
length
;
++
i
)
drawSlice
(
slices
[
i
].
angle
,
options
.
series
.
pie
.
stroke
.
color
,
false
);
ctx
.
restore
();
}
// draw donut hole
drawDonutHole
(
ctx
);
// draw labels
if
(
options
.
series
.
pie
.
label
.
show
)
drawLabels
();
// restore to original state
ctx
.
restore
();
function
drawSlice
(
angle
,
color
,
fill
)
{
if
(
angle
<=
0
||
isNaN
(
angle
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment