AW: Pie chart

> -----Ursprüngliche Nachricht-----
> Von: Chris Lilley [mailto:chris@w3.org]
> Gesendet am: Donnerstag, 8. Juni 2000 20:32
> An: Schmitt, Christian
> Cc: 'www-svg@w3.org'
> Betreff: Re: Pie chart
> 
> 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.
> 
> --
> Chris


Chris,
thanks for your hint.
I came up with something (see below). But I'm probably missing something
really stupid here, because the chart doesn't look exactly like I expected
it to.

Thanks,
Christian

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN"
"http://www.w3.org/TR/2000/03/WD-SVG-20000303/">
<svg height="300" width="300" xml:space="preserve">
<g style="fill:none; stroke:#232323" transform="translate(150,150)">
<g transform=" rotate( 108 ) ">
  <path style="stroke:#0000FF" d="M 0,0 l 0,50 a 50,50 0 0 0 50,-50 z">
  </path>
    <g transform=" rotate( 46.8 ) ">
      <path style="stroke:#00FF00" d="M 0,0 l 0,50 a 50,50 0 0 0 50,-50 z">
      </path>
        <g transform=" rotate( 54 ) ">
          <path style="stroke:#FF0000" d="M 0,0 l 0,50 a 50,50 0 0 0 50,-50
z">
          </path>
            <g transform=" rotate( 36 ) ">
              <path style="stroke:#AAAAAA" d="M 0,0 l 0,50 a 50,50 0 0 0
50,-50 z">
              </path>
                <g transform=" rotate( 115.2 ) ">
                  <path style="stroke:#121212" d="M 0,0 l 0,50 a 50,50 0 0 0
50,-50 z">
                  </path>
                </g>
            </g>
        </g>
    </g>
</g>
</g>
</svg>

Received on Friday, 9 June 2000 03:12:16 UTC