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