
    f
                     D    d dl mZ ddlmZ  G d dej                  ZdS )    )warn   )	chart_piec                   <     e Zd ZdZd fd	Zd Zd Zd Zd Z xZ	S )	ChartDoughnutz?
    A class for writing the Excel XLSX Doughnut charts.


    Nc                     t          t          |                                            d| _        d| _        d| _        dS )z
        Constructor.

        r   r   2   N)superr   __init__vary_data_colorrotation	hole_size)selfoptions	__class__s     [/var/www/ffwdstore.be/apps/py-env/lib/python3.11/site-packages/xlsxwriter/chart_doughnut.pyr   zChartDoughnut.__init__   s;    
 	mT""++---     c                 v    |dS |dk     s|dk    rt          d|z             dS t          |          | _        dS )z
        Set the Doughnut chart hole size.

        Args:
            size: 10 <= size <= 90.

        Returns:
            Nothing.

        N
   Z   z8Chart hole size %d outside Excel range: 10 <= size <= 90)r   intr   )r   sizes     r   set_hole_sizezChartDoughnut.set_hole_size%   sK     <F "99r		KdRSSSFTr   c                 0    |                      |           d S N)_write_doughnut_chart)r   argss     r   _write_chart_typezChartDoughnut._write_chart_type@   s     	""4(((((r   c                    |                      d           |                                  | j        D ]}|                     |           |                                  |                                  |                     d           d S )Nzc:doughnutChart)_xml_start_tag_write_vary_colorsseries
_write_ser_write_first_slice_ang_write_c_hole_size_xml_end_tag)r   r   datas      r   r   z#ChartDoughnut._write_doughnut_chartK   s     	-... 	!!! K 	" 	"DOOD!!!! 	##%%% 	!!!+,,,,,r   c                 F    d| j         fg}|                     d|           d S )Nvalz
c:holeSize)r   _xml_empty_tag)r   
attributess     r   r%   z ChartDoughnut._write_c_hole_size_   s-    dn-.
L*55555r   r   )
__name__
__module____qualname____doc__r   r   r   r   r%   __classcell__)r   s   @r   r   r      s         	 	 	 	 	 	# # #6) ) )- - -(6 6 6 6 6 6 6r   r   N)warningsr    r   ChartPier    r   r   <module>r5      sl               V6 V6 V6 V6 V6I& V6 V6 V6 V6 V6r   