Mouse-Controlled Rotating Circular Pie Charts

   



Key Constructs

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.



   



Fundamentals of SVG Programming. Concepts to Source Code
Fundamentals of SVG Programming: Concepts to Source Code (Graphics Series)
ISBN: 1584502983
EAN: 2147483647
Year: 2003
Pages: 362

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net