.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.floatcanvas.FCObjects

.. highlight:: python



.. _wx.lib.floatcanvas.FCObjects.PieChart:

==========================================================================================================================================
|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
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>PieChart</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.floatcanvas.FCObjects.PieChart_inheritance.png" alt="Inheritance diagram of PieChart" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.floatcanvas.FCObjects.PieChart.html" title="wx.lib.floatcanvas.FCObjects.PieChart" alt="" coords="355,83,623,112"/> <area shape="rect" id="node2" href="wx.lib.floatcanvas.FCObjects.XYObjectMixin.html" title="wx.lib.floatcanvas.FCObjects.XYObjectMixin" alt="" coords="5,5,312,35"/> <area shape="rect" id="node3" href="wx.lib.floatcanvas.FCObjects.LineOnlyMixin.html" title="wx.lib.floatcanvas.FCObjects.LineOnlyMixin" alt="" coords="337,5,642,35"/> <area shape="rect" id="node4" href="wx.lib.floatcanvas.FCObjects.DrawObject.html" title="wx.lib.floatcanvas.FCObjects.DrawObject" alt="" coords="666,5,955,35"/> </map> 
   </p>
   </div>

|


|super_classes| Known Superclasses
==================================

:class:`wx.lib.floatcanvas.FCObjects.DrawObject`, :class:`wx.lib.floatcanvas.FCObjects.LineOnlyMixin`, :class:`wx.lib.floatcanvas.FCObjects.XYObjectMixin`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.floatcanvas.FCObjects.PieChart.__init__`                          Default class constructor.
:meth:`~wx.lib.floatcanvas.FCObjects.PieChart.CalcBoundingBox`                   Calculate the bounding box.
:meth:`~wx.lib.floatcanvas.FCObjects.PieChart.CalculatePoints`                   Calculate the points.
:meth:`~wx.lib.floatcanvas.FCObjects.PieChart.SetBrushes`                        Set the Brushes.
:meth:`~wx.lib.floatcanvas.FCObjects.PieChart.SetFillColors`                     Set the FillColors and update the Brushes.
:meth:`~wx.lib.floatcanvas.FCObjects.PieChart.SetFillStyles`                     Set te FillStyles and update the Brushes.
:meth:`~wx.lib.floatcanvas.FCObjects.PieChart.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.

   .. method:: __init__(self, XY, Diameter, Values, FillColors=None, FillStyles=None, LineColor = None, LineStyle = "Solid", LineWidth    = 1, Scaled = True, InForeground = False)

      Default class constructor.
      
      :param `XY`: The (x,y) coords of the center of the chart
      :param `Diameter`: The diamter of the chart in world coords, unless you
               set "Scaled" to False, in which case it's in pixel coords.
      :param `Values`: sequence of values you want to make the chart of.
      :param `FillColors`: sequence of colors you want the slices. If
               None, it will choose (no guarantee you'll like them!)
      :param `FillStyles`: Fill style you want ("Solid", "Hash", etc)
      :param `LineColor`: Color of lines separating the slices
      :param `LineStyle`: style of lines separating the slices
      :param `LineWidth`: With of lines separating the slices
      :param `Scaled`: Do you want the pie to scale when zooming?
               or stay the same size in pixels?
      :param `InForeground`: Should it be on the foreground?


   .. method:: CalcBoundingBox(self)

      Calculate the bounding box.


   .. method:: CalculatePoints(self)

      Calculate the points.


   .. method:: SetBrushes(self)

      Set the Brushes.


   .. method:: SetFillColors(self, FillColors)

      Set the FillColors and update the Brushes.
      
      :param `FillColors`: sequence of colors


   .. method:: SetFillStyles(self, FillStyles)

      Set te FillStyles and update the Brushes.
      
      :param `FillStyles`: Fill style you want ("Solid", "Hash", etc)


   .. method:: SetValues(self, Values)

      Set the values and calculate the points.
      
      :param `Values`: sequence of values you want to use for the chart


