Page 1 of 1

how can i draw a pie chart

Posted: 2018-02-15T06:10:03-07:00
by mmotta19
Hello.

I'm trying to create a pie chart, but I don't understand 2 parameters of the sintaxe.
For exemple:
convert -size 280x280 xc:yellow -stroke black -fill blue -draw "path 'M 120,140 L 120.00,40.00 A 100,100 0 0,1 220,140 Z'" c:\temp\pie.jpg

After de parameter A 100,100 has a 0 and 0,1 ( A 100,100 0 0,1 ....)

If I use like this, it don't works:
convert -size 280x280 xc:yellow -stroke black -fill blue -draw "path 'M 120,140 L 120.00,40.00 A 100,100 0 0,1 20,140 Z'" c:\temp\pie.jpg
I have to change the 0,1 to 1,1.

I don't know to determinate wich number it have to be.

Could someone help me?
thanks.
Marcelo Motta

Re: how can i draw a pie chart

Posted: 2018-02-15T08:10:27-07:00
by snibgo
The path commands "A", "L" etc are defined in the SVG standard. See https://www.w3.org/TR/SVG/paths.html#Pa ... veCommands . This explains the seven parameters to "A", with examples.

Your two parameters "0,1" are large-arc-flag and sweep-flag.