wx.lib.floatcanvas.FCObjects.PieChart¶
This is DrawObject for a pie chart
You can pass in a bunch of values, and it will draw a pie chart for you, and it will make the chart, scaling the size of each “slice” to match your values.
Class Hierarchy¶
Known Superclasses¶
wx.lib.floatcanvas.FCObjects.DrawObject, wx.lib.floatcanvas.FCObjects.LineOnlyMixin, wx.lib.floatcanvas.FCObjects.XYObjectMixin
Methods Summary¶
Default class constructor. |
|
Calculate the bounding box. |
|
Calculate the points. |
|
Set the Brushes. |
|
Set the FillColors and update the Brushes. |
|
Set the FillStyles and update the Brushes. |
|
Set the values and calculate the points. |
Class API¶
- class PieChart(XYObjectMixin, LineOnlyMixin, DrawObject)¶
This is DrawObject for a pie chart
You can pass in a bunch of values, and it will draw a pie chart for you, and it will make the chart, scaling the size of each “slice” to match your values.
Methods¶
- __init__(self, XY, Diameter, Values, FillColors=None, FillStyles=None, LineColor=None, LineStyle='Solid', LineWidth=1, Scaled=True, InForeground=False)¶
Default class constructor.
- Parameters:
XY – The (x,y) coords of the center of the chart
Diameter – The diameter of the chart in world coords, unless you set “Scaled” to False, in which case it’s in pixel coords.
Values – sequence of values you want to make the chart of.
FillColors – sequence of colors you want the slices. If None, it will choose (no guarantee you’ll like them!)
FillStyles – Fill style you want (“Solid”, “Hash”, etc)
LineColor – Color of lines separating the slices
LineStyle – style of lines separating the slices
LineWidth – With of lines separating the slices
Scaled – Do you want the pie to scale when zooming? or stay the same size in pixels?
InForeground – Should it be on the foreground?
- CalcBoundingBox(self)¶
Calculate the bounding box.
- CalculatePoints(self)¶
Calculate the points.
- SetBrushes(self)¶
Set the Brushes.
- SetFillColors(self, FillColors)¶
Set the FillColors and update the Brushes.
- Parameters:
FillColors – sequence of colors
- SetFillStyles(self, FillStyles)¶
Set the FillStyles and update the Brushes.
- Parameters:
FillStyles – Fill style you want (“Solid”, “Hash”, etc)
- SetValues(self, Values)¶
Set the values and calculate the points.
- Parameters:
Values – sequence of values you want to use for the chart