Phoenix Logo

phoenix_title 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 Class Hierarchy

Inheritance diagram for class PieChart:

method_summary Methods Summary

__init__ Default class constructor.
CalcBoundingBox Calculate the bounding box.
CalculatePoints Calculate the points.
SetBrushes Set the Brushes.
SetFillColors Set the FillColors and update the Brushes.
SetFillStyles Set te FillStyles and update the Brushes.
SetValues Set the values and calculate the points.

api 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 diamter of the chart in worls 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 te 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