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.
wx.lib.floatcanvas.FCObjects.DrawObject
, wx.lib.floatcanvas.FCObjects.LineOnlyMixin
, wx.lib.floatcanvas.FCObjects.XYObjectMixin
Default class constructor. |
|
Calculate the bounding box. |
|
Calculate the points. |
|
Set the Brushes. |
|
Set the FillColors and update the Brushes. |
|
Set te FillStyles and update the Brushes. |
|
Set the values and calculate the points. |
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.
__init__
(self, XY, Diameter, Values, FillColors=None, FillStyles=None, LineColor = None, LineStyle = "Solid", LineWidth = 1, Scaled = True, InForeground = False)¶Default class constructor.
XY – The (x,y) coords of the center of the chart
Diameter – The diamter 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.
FillColors – sequence of colors
SetFillStyles
(self, FillStyles)¶Set te FillStyles and update the Brushes.
FillStyles – Fill style you want (“Solid”, “Hash”, etc)
SetValues
(self, Values)¶Set the values and calculate the points.
Values – sequence of values you want to use for the chart