|
|
Circular and elliptic pie charts in SVG involve three things: 1) initializing an array with a set of angle values, 2) using the sine and cosine functions in order to calculate the points on a circle or an ellipse, and 3) dynamically creating a set of elliptic arcs whose angle spans are commensurate with their fractional value of the total value.
You can make the elliptic arcs 'mouse aware' by specifying an ECMAScript function in the onclick attribute (or another mouse-related event of your choice) that is included as part of the definition of each dynamically created elliptic arc.
|
|