W3C home > Mailing lists > Public > www-svg@w3.org > June 2000

Re: Pie chart

From: Chris Lilley <chris@w3.org>
Date: Thu, 08 Jun 2000 20:32:18 +0200
Message-ID: <393FE6B2.90696A85@w3.org>
To: "Schmitt, Christian" <Christian.Schmitt@dresdner-bank.com>
CC: "'www-svg@w3.org'" <www-svg@w3.org>

"Schmitt, Christian" wrote:
> Hi,
> I have this challenge here to create an HTML page form XML (sales) data.
> That so far is no problem. Whar is a problem that there is a pie chart to be
> included. I've been playing around with SVG using rotate() and paths with
> arcs and the like but I haven't found a solution yet to produce a pie chart.
> Does anyone have a hint for me on how to go about doing that?

Depends on whether you want a psuedo-3D look or not. 

If not, then calculating percentages of sales is easy, multiply by 3.6 to
get degrees, draw arcs and radial lines, and fill. A color key is also
easy. Exploded segments (translate, on a radial line midway between the
start and end arcs for that segment) are also trivial.

Received on Thursday, 8 June 2000 14:32:29 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:48 UTC