Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Resolve issue rendering multiple donut charts #1214

Closed
wants to merge 1 commit into from

2 participants

@EricWegscheid

After the innerRadius value is set, somehow it carries over to all other '.flot-overlay' canvases of pie graphs in the DOM as they are redrawn. To resolve this: inside drawOverlay() at line 715, I check this particular instance's options to determine whether we really do need to drawDonutHole():

if (options.series.pie.innerRadius > 0) {
drawDonutHole(octx);

}

@EricWegscheid EricWegscheid Resolved issue rendering multiple donut charts
After the innerRadius value is set, somehow it carries over to all other '.flot-overlay' canvases in the DOM as they are redrawn. So, inside drawOverlay() at line 715, I check this particular instance's options to determine whether we really do need to drawDonutHole():
if (options.series.pie.innerRadius > 0) {
    drawDonutHole(octx);	
}
25ad0b9
@dnschnur
Owner

Are you sure you were using the latest version when you saw this? This sounds identical to #1073 and #1128 that were fixed in 0.8.2.

@dnschnur dnschnur closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 27, 2013
  1. @EricWegscheid

    Resolved issue rendering multiple donut charts

    EricWegscheid authored
    After the innerRadius value is set, somehow it carries over to all other '.flot-overlay' canvases in the DOM as they are redrawn. So, inside drawOverlay() at line 715, I check this particular instance's options to determine whether we really do need to drawDonutHole():
    if (options.series.pie.innerRadius > 0) {
        drawDonutHole(octx);	
    }
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 jquery.flot.pie.js
View
8 jquery.flot.pie.js
@@ -735,7 +735,13 @@ More detail and specific examples can be found in the included HTML file.
drawHighlight(highlights[i].series);
}
- drawDonutHole(octx);
+ // after the innerRadius value is set, somehow it carries over to
+ // all other '.flot-overlay' canvases in the DOM as they are redrawn
+ // so, check this particular instance's options to determine whether
+ // we really do need to drawDonutHole() at this point
+ if (options.series.pie.innerRadius > 0) {
+ drawDonutHole(octx);
+ }
octx.restore();
Something went wrong with that request. Please try again.