Re: Any pyChart experts lend a hand?



john.mcginnis@xxxxxxxxxxx wrote:
Code
----------------------------------------------------
from pychart import *
import sys
theme.get_options()

theme.use_color = True
theme.output_format="png"
theme.output_file="C:\Comp\graphic\pic1.png"
theme.reinitialize()

data = [("foo", 10),("bar", 20), ("baz", 30), ("ao", 40)]

ar = area.T(size=(300,300), legend=legend.T(),
x_grid_style = None, y_grid_style = None)

plot = pie_plot.T(data=data, arc_offsets=[0,10,0,10],
shadow = (2, -2, fill_style.gray50),
label_offset = 25,
arrow_style = arrow.a3)
ar.add_plot(plot)
ar.draw()


i've been playing with pychart for exactly 5 minutes just before i read your post, so i doubt that makes me an expert, but i did your code to work by changing your code to this:


from pychart import *
import sys
theme.get_options()

theme.use_color = True

can = canvas.init('pic1.png')

data = [("foo", 10),("bar", 20), ("baz", 30), ("ao", 40)]

ar = area.T(size=(300,300), legend=legend.T(),
x_grid_style = None, y_grid_style = None)

plot = pie_plot.T(data=data, arc_offsets=[0,10,0,10],
shadow = (2, -2, fill_style.gray50),
label_offset = 25,
arrow_style = arrow.a3)
ar.add_plot(plot)
ar.draw()



bryan

.