Skip to content

Adjusted pie plugin to handle manual highlighting and stroke color #69

Open
wants to merge 1 commit into from

1 participant

@floyd-may

I adjusted the pie plugin to handle manually highlighting / unhighlighting (via calls to plot.highlight(...) or plot.unhighlight(...)). I also added a stroke color option to stroke the highlighted pie wedge with the given color in the options. If the option evaluates to something falsy, no stroke is applied to the highlight.

@floyd-may floyd-may Updated pie plugin to include a highlight stroke color as well as mon…
…key-patching to manually highlight pie wedges via highlight / unhighlight calls.
e083262
@floyd-may floyd-may commented on the diff Aug 9, 2012
jquery.flot.pie.js
@@ -116,6 +116,10 @@ More detail and specific examples can be found in the included HTML file.
// add draw hook
plot.hooks.draw.push(draw);
+
+ // monkey-patch the plot object to enable direct highlighting of pie slices
@floyd-may
floyd-may added a note Aug 9, 2012

Hate to monkey-patch, and would have called the original highlight function, but the original throws errors if you call it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.