Pie chart with interactive resizable slices

We recently needed to elicit user values within a quota limit. The idea of an interactive pie chart with draggable slices came to mind, but somehow it appears that no such code exists in JavaScript (one exists using a Java applet, but we didn’t want to use that). We created our own therefore, based on this package, and though not draggable by the slice, you can still use your left mouse button to click on a slice to increase its size (affecting the next slice clockwise only), and the right mouse button to decrease it. Code is available on this JSFiddle for you to check out or even manipulate!.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s