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
f0652fd0
Commit
f0652fd0
authored
Dec 21, 2012
by
David Schnur
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #910 from dnschnur/pie-resize-fix
Allow the pie chart to redraw on resize or update.
parents
715a0933
d09b2786
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
jquery.flot.pie.js
jquery.flot.pie.js
+9
-2
No files found.
jquery.flot.pie.js
View file @
f0652fd0
...
@@ -190,8 +190,6 @@ More detail and specific examples can be found in the included HTML file.
...
@@ -190,8 +190,6 @@ More detail and specific examples can be found in the included HTML file.
canvas
=
plot
.
getCanvas
();
canvas
=
plot
.
getCanvas
();
target
=
$
(
canvas
).
parent
();
target
=
$
(
canvas
).
parent
();
options
=
plot
.
getOptions
();
options
=
plot
.
getOptions
();
canvasWidth
=
plot
.
getPlaceholder
().
width
();
canvasHeight
=
plot
.
getPlaceholder
().
height
();
plot
.
setData
(
combine
(
plot
.
getData
()));
plot
.
setData
(
combine
(
plot
.
getData
()));
}
}
}
}
...
@@ -293,6 +291,9 @@ More detail and specific examples can be found in the included HTML file.
...
@@ -293,6 +291,9 @@ More detail and specific examples can be found in the included HTML file.
return
;
// if no series were passed
return
;
// if no series were passed
}
}
canvasWidth
=
plot
.
getPlaceholder
().
width
();
canvasHeight
=
plot
.
getPlaceholder
().
height
();
ctx
=
newCtx
;
ctx
=
newCtx
;
setupPie
();
setupPie
();
...
@@ -317,6 +318,12 @@ More detail and specific examples can be found in the included HTML file.
...
@@ -317,6 +318,12 @@ More detail and specific examples can be found in the included HTML file.
target
.
prepend
(
"<div class='error'>Could not draw pie with labels contained inside canvas</div>"
);
target
.
prepend
(
"<div class='error'>Could not draw pie with labels contained inside canvas</div>"
);
}
}
// Reset the redraw flag on success, so the loop above can run
// again in the event of a resize or other update.
// TODO: We should remove this redraw system entirely!
redraw
=
true
;
if
(
plot
.
setSeries
&&
plot
.
insertLegend
)
{
if
(
plot
.
setSeries
&&
plot
.
insertLegend
)
{
plot
.
setSeries
(
slices
);
plot
.
setSeries
(
slices
);
plot
.
insertLegend
();
plot
.
insertLegend
();
...
...
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