o
    j9t                     @  sP  d Z ddlmZ ddlZddlmZ ddlmZ ddlm	Z	m
Z
mZ ddlmZ ddlmZ G d	d
 d
eZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd  d eZG d!d" d"eZG d#d$ d$eZG d%d& d&eZdS )'zChartData and related objects.    )annotationsN)Sequence)Number)BubbleWorkbookWriterCategoryWorkbookWriterXyWorkbookWriter)ChartXmlWriter)lazypropertyc                      s   e Zd ZdZd fdd	Zdd Zdd Zd	d
 Zdd Ze	dd Z
dd Zdd Zdd Ze	dd Zdd Zdd Ze	dd Zdd Z  ZS ) _BaseChartDataa  Base class providing common members for chart data objects.

    A chart data object serves as a proxy for the chart data table that will be written to an
    Excel worksheet; operating as a sequence of series as well as providing access to chart-level
    attributes. A chart data object is used as a parameter in :meth:`shapes.add_chart` and
    :meth:`Chart.replace_data`. The data structure varies between major chart categories such as
    category charts and XY charts.
    Generalc                   s   t t|   || _g | _d S N)superr
   __init___number_format_seriesselfnumber_format	__class__ O/home/air/Certificate/back/venv/lib/python3.10/site-packages/pptx/chart/data.pyr         
z_BaseChartData.__init__c                 C     | j |S r   )r   __getitem__r   indexr   r   r   r   !      z_BaseChartData.__getitem__c                 C  
   | j  S r   )r   __len__r   r   r   r   r   $      
z_BaseChartData.__len__c                 C  r   r   )r   appendr   seriesr   r   r   r"   '   r   z_BaseChartData.appendc                 C  s2   d}| D ]}||u r|  S |t |7 }qtd)z
        The total integer number of data points appearing in the series of
        this chart that are prior to *series* in this sequence.
        r   series not in chart data object)len
ValueError)r   r$   countthis_seriesr   r   r   data_point_offset*   s   z _BaseChartData.data_point_offsetc                 C     | j S )ao  
        The formatting template string, e.g. '#,##0.0', that determines how
        X and Y values are formatted in this chart and in the Excel
        spreadsheet. A number format specified on a series will override this
        value for that series. Likewise, a distinct number format can be
        specified for a particular data point within a series.
        r   r    r   r   r   r   6   s   	z_BaseChartData.number_formatc                 C  s*   t | D ]\}}||u r|  S qtd)zH
        Return the integer index of *series* in this sequence.
        r%   )	enumerater'   )r   r$   idxsr   r   r   series_indexA   s
   z_BaseChartData.series_indexc                 C  r   )zl
        Return the Excel worksheet reference to the cell containing the name
        for *series*.
        )_workbook_writerseries_name_refr#   r   r   r   r2   J      z_BaseChartData.series_name_refc                 C  r   )zv
        The Excel worksheet reference to the X values for *series* (not
        including the column label).
        )r1   x_values_refr#   r   r   r   r4   Q   r3   z_BaseChartData.x_values_refc                 C     | j jS )z
        Return a blob containing an Excel workbook file populated with the
        contents of this chart data object.
        )r1   	xlsx_blobr    r   r   r   r6   X      z_BaseChartData.xlsx_blobc                 C  s   |  |dS )z
        Return a blob containing the XML for a chart of *chart_type*
        containing the series in this chart data object, as bytes suitable
        for writing directly to a file.
        zutf-8)_xmlencoder   
chart_typer   r   r   	xml_bytes`      z_BaseChartData.xml_bytesc                 C  r   )zv
        The Excel worksheet reference to the Y values for *series* (not
        including the column label).
        )r1   y_values_refr#   r   r   r   r>   h   r3   z_BaseChartData.y_values_refc                 C  s   t d)
        The worksheet writer object to which layout and writing of the Excel
        worksheet for this chart will be delegated.
        z%must be implemented by all subclasses)NotImplementedErrorr    r   r   r   r1   o   r7   z_BaseChartData._workbook_writerc                 C  s   t || jS )z
        Return (as unicode text) the XML for a chart of *chart_type*
        populated with the values in this chart data object. The XML is
        a complete XML document, including an XML declaration specifying
        UTF-8 encoding.
        )r   xmlr:   r   r   r   r8   w      z_BaseChartData._xml)r   )__name__
__module____qualname____doc__r   r   r   r"   r*   propertyr   r0   r2   r4   r6   r<   r>   r1   r8   __classcell__r   r   r   r   r
      s&    	

	

r
   c                   @  s   e Zd ZdZdd Zdd Zdd Zdd	 Zed
d Z	edd Z
edd Zedd Zedd Zedd Zedd Zedd Zedd ZdS )_BaseSeriesDataa   
    Base class providing common members for series data objects. A series
    data object serves as proxy for a series data column in the Excel
    worksheet. It operates as a sequence of data points, as well as providing
    access to series-level attributes like the series label.
    c                 C  s   || _ || _|| _g | _d S r   )_chart_data_namer   _data_points)r   
chart_datanamer   r   r   r   r      s   
z_BaseSeriesData.__init__c                 C  r   r   )rL   r   r   r   r   r   r      r   z_BaseSeriesData.__getitem__c                 C  r   r   )rL   r   r    r   r   r   r      r!   z_BaseSeriesData.__len__c                 C  r   r   )rL   r"   )r   
data_pointr   r   r   r"      r   z_BaseSeriesData.appendc                 C     | j | S )zm
        The integer count of data points that appear in all chart series
        prior to this one.
        )rJ   r*   r    r   r   r   r*         z!_BaseSeriesData.data_point_offsetc                 C  rP   )z
        Zero-based integer indicating the sequence position of this series in
        its chart. For example, the second of three series would return `1`.
        )rJ   r0   r    r   r   r   r      rQ   z_BaseSeriesData.indexc                 C     | j dur| j S dS )z
        The name of this series, e.g. 'Series 1'. This name is used as the
        column heading for the y-values of this series and may also appear in
        the chart legend and perhaps other chart locations.
        N )rK   r    r   r   r   rN         z_BaseSeriesData.namec                 C  rP   )zh
        The Excel worksheet reference to the cell containing the name for
        this series.
        )rJ   r2   r    r   r   r   name_ref   rQ   z_BaseSeriesData.name_refc                 C     | j }|du r| jjS |S )a  
        The formatting template string that determines how a number in this
        series is formatted, both in the chart and in the Excel spreadsheet;
        for example '#,##0.0'. If not specified for this series, it is
        inherited from the parent chart data object.
        N)r   rJ   r   r   r   r   r   r         z_BaseSeriesData.number_formatc                 C     dd | j D S )zr
        A sequence containing the X value of each datapoint in this series,
        in data point order.
        c                 S     g | ]}|j qS r   )x.0dpr   r   r   
<listcomp>       z,_BaseSeriesData.x_values.<locals>.<listcomp>rL   r    r   r   r   x_values   r=   z_BaseSeriesData.x_valuesc                 C  rP   )zz
        The Excel worksheet reference to the X values for this chart (not
        including the column heading).
        )rJ   r4   r    r   r   r   r4      rQ   z_BaseSeriesData.x_values_refc                 C  rX   )zr
        A sequence containing the Y value of each datapoint in this series,
        in data point order.
        c                 S  rY   r   )yr[   r   r   r   r^      r_   z,_BaseSeriesData.y_values.<locals>.<listcomp>r`   r    r   r   r   y_values   r=   z_BaseSeriesData.y_valuesc                 C  rP   )zz
        The Excel worksheet reference to the Y values for this chart (not
        including the column heading).
        )rJ   r>   r    r   r   r   r>      rQ   z_BaseSeriesData.y_values_refN)rC   rD   rE   rF   r   r   r   r"   rG   r*   r   rN   rU   r   ra   r4   rc   r>   r   r   r   r   rI      s0    







rI   c                      ,   e Zd ZdZ fddZedd Z  ZS )_BaseDataPointzE
    Base class providing common members for data point objects.
    c                   s   t t|   || _|| _d S r   )r   re   r   _series_datar   )r   series_datar   r   r   r   r      r   z_BaseDataPoint.__init__c                 C  rV   )a(  
        The formatting template string that determines how the value of this
        data point is formatted, both in the chart and in the Excel
        spreadsheet; for example '#,##0.0'. If not specified for this data
        point, it is inherited from the parent series data object.
        N)r   rf   r   r   r   r   r   r      rW   z_BaseDataPoint.number_format)rC   rD   rE   rF   r   rG   r   rH   r   r   r   r   re      s
    re   c                   @  s\   e Zd ZdZdd ZdddZedd	 Zejd
d	 Zedd Z	dd Z
edd ZdS )CategoryChartDataa  
    Accumulates data specifying the categories and series values for a chart
    and acts as a proxy for the chart data table that will be written to an
    Excel worksheet. Used as a parameter in :meth:`shapes.add_chart` and
    :meth:`Chart.replace_data`.

    This object is suitable for use with category charts, i.e. all those
    having a discrete set of label values (categories) as the range of their
    independent variable (X-axis) values. Unlike the ChartData types for
    charts supporting a continuous range of independent variable values (such
    as XyChartData), CategoryChartData has a single collection of category
    (X) values and each data point in its series specifies only the Y value.
    The corresponding X value is inferred by its position in the sequence.
    c                 C  r   )a  
        Return a newly created |data.Category| object having *label* and
        appended to the end of the category collection for this chart.
        *label* can be a string, a number, a datetime.date, or
        datetime.datetime object. All category labels in a chart must be the
        same type. All category labels in a chart having multi-level
        categories must be strings.
        )
categoriesadd_category)r   labelr   r   r   rj     s   	zCategoryChartData.add_categoryr   Nc                 C  s.   t | ||}| | |D ]}|| q|S )a>  
        Add a series to this data set entitled *name* and having the data
        points specified by *values*, an iterable of numeric values.
        *number_format* specifies how the series values will be displayed,
        and may be a string, e.g. '#,##0' corresponding to an Excel number
        format.
        )CategorySeriesDatar"   add_data_point)r   rN   valuesr   rg   valuer   r   r   
add_series  s
   
zCategoryChartData.add_seriesc                 C  s   t | dds
t | _| jS )a  |data.Categories| object providing access to category-object hierarchy.

        Assigning an iterable of category labels (strings, numbers, or dates) replaces
        the |data.Categories| object with a new one containing a category for each label
        in the sequence.

        Creating a chart from chart data having date categories will cause the chart to
        have a |DateAxis| for its category axis.
        _categoriesF)getattr
Categoriesrq   r    r   r   r   ri   (  s   zCategoryChartData.categoriesc                 C  s$   t  }|D ]}|| q|| _d S r   )rs   rj   rq   )r   category_labelsri   rk   r   r   r   ri   7  s   
c                 C  r5   z|
        The Excel worksheet reference to the categories for this chart (not
        including the column heading).
        )r1   categories_refr    r   r   r   rv   >  r7   z CategoryChartData.categories_refc                 C  r   )zv
        The Excel worksheet reference to the values for *series* (not
        including the column heading).
        )r1   
values_refr#   r   r   r   rw   F  r3   zCategoryChartData.values_refc                 C     t | S r?   )r   r    r   r   r   r1   M  r7   z"CategoryChartData._workbook_writer)r   N)rC   rD   rE   rF   rj   rp   rG   ri   setterrv   rw   r	   r1   r   r   r   r   rh      s    



rh   c                      s   e Zd ZdZ fddZdd Zdd Zdd	 Zed
d Z	edd Z
edd Zdd Zedd Zedd Zedd Zejdd Z  ZS )rs   z
    A sequence of |data.Category| objects, also having certain hierarchical
    graph behaviors for support of multi-level (nested) categories.
    c                   s   t t|   g | _d | _d S r   )r   rs   r   rq   r   r    r   r   r   r   \  r   zCategories.__init__c                 C  r   r   )rq   r   )r   r.   r   r   r   r   a  r   zCategories.__getitem__c                 C  r   )z
        Return the count of the highest level of category in this sequence.
        If it contains hierarchical (multi-level) categories, this number
        will differ from :attr:`category_count`, which is the number of leaf
        nodes.
        )rq   r   r    r   r   r   r   d  s   
zCategories.__len__c                 C     t || }| j| |S )a   
        Return a newly created |data.Category| object having *label* and
        appended to the end of this category sequence. *label* can be
        a string, a number, a datetime.date, or datetime.datetime object. All
        category labels in a chart must be the same type. All category labels
        in a chart having multi-level categories must be strings.

        Creating a chart from chart data having date categories will cause
        the chart to have a |DateAxis| for its category axis.
        )Categoryrq   r"   r   rk   categoryr   r   r   rj   m  s   
zCategories.add_categoryc                 C  s6   | j dkrdS | d j}tjtjf}t||rdS dS )a  
        Return |True| if the first category in this collection has a date
        label (as opposed to str or numeric). A date label is one of type
        datetime.date or datetime.datetime. Returns |False| otherwise,
        including when this category collection is empty. It also returns
        False when this category collection is hierarchical, because
        hierarchical categories can only be written as string labels.
           Fr   T)depthrk   datetimedate
isinstance)r   first_cat_label
date_typesr   r   r   	are_dates|  s   



zCategories.are_datesc                 C  s8   | j dkrdS | d j}ttjtjf}t||rdS dS )a  
        Return |True| if the first category in this collection has a numeric
        label (as opposed to a string label), including if that value is
        a datetime.date or datetime.datetime object (as those are converted
        to integers for storage in Excel). Returns |False| otherwise,
        including when this category collection is empty. It also returns
        False when this category collection is hierarchical, because
        hierarchical categories can only be written as string labels.
        r   Fr   T)r   rk   r   r   r   r   )r   r   numeric_typesr   r   r   are_numeric  s   


zCategories.are_numericc                 C  s@   | j }|sdS |d j}|dd D ]}|j|krtdq|S )zx
        The number of hierarchy levels in this category graph. Returns 0 if
        it contains no categories.
        r   r   Ncategory depth not uniform)rq   r   r'   )r   ri   first_depthr~   r   r   r   r     s   

zCategories.depthc                 C  s2   d}| j D ]}||u r|  S ||j7 }qtd)z
        The offset of *category* in the overall sequence of leaf categories.
        A non-leaf category gets the index of its first sub-category.
        r   z$category not in top-level categories)rq   
leaf_countr'   )r   r~   r   this_categoryr   r   r   r     s   
zCategories.indexc                 C  s   t dd | jD S )z
        The number of leaf-level categories in this hierarchy. The return
        value is the same as that of `len()` only when the hierarchy is
        single level.
        c                 s      | ]}|j V  qd S r   r   )r\   cr   r   r   	<genexpr>      z(Categories.leaf_count.<locals>.<genexpr>)sumrq   r    r   r   r   r     rT   zCategories.leaf_countc                 #  s&     fdd  | D ]}|V  qdS )z
        A generator of (idx, label) sequences representing the category
        hierarchy from the bottom up. The first level contains all leaf
        categories, and each subsequent is the next level up.
        c                 3  s<    dd | D }|r |D ]}|V  qdd | D V  d S )Nc                 S  s   g | ]
}|j D ]}|qqS r   )sub_categories)r\   r   scr   r   r   r^     s    z5Categories.levels.<locals>.levels.<locals>.<listcomp>c                 S  s   g | ]}|j |jfqS r   )r.   rk   )r\   catr   r   r   r^     s    r   )ri   r   levellevelsr   r   r     s   z!Categories.levels.<locals>.levelsNr   )r   r   r   r   r   r     s
   	zCategories.levelsc                 C  sF   d}| j dur
| j S | jdkr|S | d j}t|tjtjfr!dS |S )a  
        Read/write. Return a string representing the number format used in
        Excel to format these category values, e.g. '0.0' or 'mm/dd/yyyy'.
        This string is only relevant when the categories are numeric or date
        type, although it returns 'General' without error when the categories
        are string labels. Assigning |None| causes the default number format
        to be used, based on the type of the category labels.
        r   Nr   r   zyyyy\-mm\-dd)r   r   rk   r   r   r   )r   GENERALr   r   r   r   r     s   



zCategories.number_formatc                 C  s
   || _ d S r   r,   )r   ro   r   r   r   r     s   
)rC   rD   rE   rF   r   r   r   rj   rG   r   r   r   r   r   r   r   rz   rH   r   r   r   r   rs   V  s*    	





rs   c                      s~   e Zd ZdZ fddZdd Zedd Zedd	 Zd
d Z	edd Z
edd ZdddZedd Zdd Z  ZS )r|   z
    A chart category, primarily having a label to be displayed on the
    category axis, but also able to be configured in a hierarchy for support
    of multi-level category charts.
    c                   s$   t t|   || _|| _g | _d S r   )r   r|   r   _label_parent_sub_categories)r   rk   parentr   r   r   r     s   
zCategory.__init__c                 C  r{   )z
        Return a newly created |data.Category| object having *label* and
        appended to the end of the sub-category sequence for this category.
        )r|   r   r"   r}   r   r   r   add_sub_category
  s   
zCategory.add_sub_categoryc                 C  sD   | j }|sdS |d j}|dd D ]}|j|krtdq|d S )z
        The number of hierarchy levels rooted at this category node. Returns
        1 if this category has no sub-categories.
        r   r   Nr   )r   r   r'   )r   r   r   r~   r   r   r   r     s   

zCategory.depthc                 C  rP   )z
        The offset of this category in the overall sequence of leaf
        categories. A non-leaf category gets the index of its first
        sub-category.
        )r   r   r    r   r   r   r.   "  rB   zCategory.idxc                 C  s:   | j | }| jD ]}||u r|  S ||j7 }q	td)zb
        The offset of *sub_category* in the overall sequence of leaf
        categories.
        z!sub_category not in this category)r   r   r   r   r'   )r   sub_categoryr   this_sub_categoryr   r   r   r   +  s   
zCategory.indexc                 C  s   | j sdS tdd | j D S )z
        The number of leaf category nodes under this category. Returns
        1 if this category has no sub-categories.
        r   c                 s  r   r   r   )r\   r~   r   r   r   r   ?  r   z&Category.leaf_count.<locals>.<genexpr>)r   r   r    r   r   r   r   7  s   zCategory.leaf_countc                 C  rR   )z
        The value that appears on the axis for this category. The label can
        be a string, a number, or a datetime.date or datetime.datetime
        object.
        NrS   )r   r    r   r   r   rk   A  rT   zCategory.labelFc                 C  s0   | j }t|tjtjfrd| | S t| j S )a  
        The string representation of the numeric (or date) label of this
        category, suitable for use in the XML `c:pt` element for this
        category. The optional *date_1904* parameter specifies the epoch used
        for calculating Excel date numbers.
        z%.1f)r   r   r   r   _excel_date_numberstr)r   	date_1904rk   r   r   r   numeric_str_valJ  s   
zCategory.numeric_str_valc                 C  r+   )zE
        The sequence of child categories for this category.
        )r   r    r   r   r   r   V     zCategory.sub_categoriesc                 C  sb   t j| j}}||j|j|j}|r|dddn|ddd}|| }|j}|s/|dkr/|d7 }|S )z
        Return an integer representing the date label of this category as the
        number of days since January 1, 1900 (or 1904 if date_1904 is
        |True|).
        ip  r   ik        ;   )r   r   r   yearmonthdaydays)r   r   r   rk   date_epochdeltaexcel_day_numberr   r   r   r   ]  s   zCategory._excel_date_number)F)rC   rD   rE   rF   r   r   rG   r   r.   r   r   rk   r   r   r   rH   r   r   r   r   r|     s"    	


	


r|   c                   @  s   e Zd ZdZdS )	ChartDataz
    |ChartData| is simply an alias for |CategoryChartData| and may be removed
    in a future release. All new development should use |CategoryChartData|
    for creating or replacing the data in chart types other than XY and
    Bubble.
    N)rC   rD   rE   rF   r   r   r   r   r   q  s    r   c                   @  sJ   e Zd ZdZdddZedd Zedd Zed	d
 Zedd Z	dS )rl   z
    The data specific to a particular category chart series. It provides
    access to the series label, the series data points, and an optional
    number format to be applied to each data point not having a specified
    number format.
    Nc                 C     t | ||}| | |S )z
        Return a CategoryDataPoint object newly created with value *value*,
        an optional *number_format*, and appended to this sequence.
        )CategoryDataPointr"   )r   ro   r   rO   r   r   r   rm     s   
z!CategorySeriesData.add_data_pointc                 C  r5   )zt
        The |data.Categories| object that provides access to the category
        objects for this series.
        )rJ   ri   r    r   r   r   ri     r7   zCategorySeriesData.categoriesc                 C  r5   ru   )rJ   rv   r    r   r   r   rv     r7   z!CategorySeriesData.categories_refc                 C  rX   )zt
        A sequence containing the (Y) value of each datapoint in this series,
        in data point order.
        c                 S  rY   r   )ro   r[   r   r   r   r^     r_   z-CategorySeriesData.values.<locals>.<listcomp>r`   r    r   r   r   rn     r=   zCategorySeriesData.valuesc                 C  rP   )z}
        The Excel worksheet reference to the (Y) values for this series (not
        including the column heading).
        )rJ   rw   r    r   r   r   rw     rQ   zCategorySeriesData.values_refr   )
rC   rD   rE   rF   rm   rG   ri   rv   rn   rw   r   r   r   r   rl   z  s    
	


rl   c                   @  s&   e Zd ZdZdddZedd ZdS )XyChartDataz
    A specialized ChartData object suitable for use with an XY (aka. scatter)
    chart. Unlike ChartData, it has no category sequence. Rather, each data
    point of each series specifies both an X and a Y value.
    Nc                 C  r   )z
        Return an |XySeriesData| object newly created and added at the end of
        this sequence, identified by *name* and values formatted with
        *number_format*.
        )XySeriesDatar"   r   rN   r   rg   r   r   r   rp        
zXyChartData.add_seriesc                 C  rx   ry   )r   r    r   r   r   r1     r7   zXyChartData._workbook_writerr   )rC   rD   rE   rF   rp   r	   r1   r   r   r   r   r     s
    

r   c                   @  s.   e Zd ZdZd	ddZdd Zedd ZdS )
BubbleChartDataz
    A specialized ChartData object suitable for use with a bubble chart.
    A bubble chart is essentially an XY chart where the markers are scaled to
    provide a third quantitative dimension to the exhibit.
    Nc                 C  r   )z
        Return a |BubbleSeriesData| object newly created and added at the end
        of this sequence, and having series named *name* and values formatted
        with *number_format*.
        )BubbleSeriesDatar"   r   r   r   r   rp     r   zBubbleChartData.add_seriesc                 C  r   )zo
        The Excel worksheet reference for the range containing the bubble
        sizes for *series*.
        )r1   bubble_sizes_refr#   r   r   r   r     r3   z BubbleChartData.bubble_sizes_refc                 C  rx   ry   )r   r    r   r   r   r1     r7   z BubbleChartData._workbook_writerr   )rC   rD   rE   rF   rp   r   r	   r1   r   r   r   r   r     s    

r   c                   @  s   e Zd ZdZdddZdS )r   a  
    The data specific to a particular XY chart series. It provides access to
    the series label, the series data points, and an optional number format
    to be applied to each data point not having a specified number format.

    The sequence of data points in an XY series is significant; lines are
    plotted following the sequence of points, even if that causes a line
    segment to "travel backward" (implying a multi-valued function). The data
    points are not automatically sorted into increasing order by X value.
    Nc                 C  s   t | |||}| | |S )z|
        Return an XyDataPoint object newly created with values *x* and *y*,
        and appended to this sequence.
        )XyDataPointr"   )r   rZ   rb   r   rO   r   r   r   rm     s   
zXySeriesData.add_data_pointr   )rC   rD   rE   rF   rm   r   r   r   r   r     s    r   c                   @  s2   e Zd ZdZd	ddZedd Zedd ZdS )
r   a  
    The data specific to a particular Bubble chart series. It provides access
    to the series label, the series data points, and an optional number
    format to be applied to each data point not having a specified number
    format.

    The sequence of data points in a bubble chart series is maintained
    throughout the chart building process because a data point has no unique
    identifier and can only be retrieved by index.
    Nc                 C  s   t | ||||}| | |S )z
        Append a new BubbleDataPoint object having the values *x*, *y*, and
        *size*. The optional *number_format* is used to format the Y value.
        If not provided, the number format is inherited from the series data.
        )BubbleDataPointr"   )r   rZ   rb   sizer   rO   r   r   r   rm   	  s   
zBubbleSeriesData.add_data_pointc                 C  rX   )zw
        A sequence containing the bubble size for each datapoint in this
        series, in data point order.
        c                 S  rY   r   )bubble_sizer[   r   r   r   r^     r_   z1BubbleSeriesData.bubble_sizes.<locals>.<listcomp>r`   r    r   r   r   bubble_sizes  r=   zBubbleSeriesData.bubble_sizesc                 C  rP   )zr
        The Excel worksheet reference for the range containing the bubble
        sizes for this series.
        )rJ   r   r    r   r   r   r     rQ   z!BubbleSeriesData.bubble_sizes_refr   )rC   rD   rE   rF   rm   rG   r   r   r   r   r   r   r     s    


r   c                      rd   )r   z
    A data point in a category chart series. Provides access to the value of
    the datapoint and the number format with which it should appear in the
    Excel file.
    c                   s   t t| || || _d S r   )r   r   r   _value)r   rg   ro   r   r   r   r   r   +  s   
zCategoryDataPoint.__init__c                 C  r+   )z=
        The (Y) value for this category data point.
        )r   r    r   r   r   ro   /  r   zCategoryDataPoint.value)rC   rD   rE   rF   r   rG   ro   rH   r   r   r   r   r   $  s
    r   c                      s8   e Zd ZdZ fddZedd Zedd Z  ZS )r   zi
    A data point in an XY chart series. Provides access to the x and y values
    of the datapoint.
    c                   s"   t t| || || _|| _d S r   )r   r   r   _x_y)r   rg   rZ   rb   r   r   r   r   r   =  s   
zXyDataPoint.__init__c                 C  r+   )z5
        The X value for this XY data point.
        )r   r    r   r   r   rZ   B  r   zXyDataPoint.xc                 C  r+   )z5
        The Y value for this XY data point.
        )r   r    r   r   r   rb   I  r   zXyDataPoint.y)	rC   rD   rE   rF   r   rG   rZ   rb   rH   r   r   r   r   r   7  s    
r   c                      rd   )r   zs
    A data point in a bubble chart series. Provides access to the x, y, and
    size values of the datapoint.
    c                   s    t t| |||| || _d S r   )r   r   r   _size)r   rg   rZ   rb   r   r   r   r   r   r   W  s   
zBubbleDataPoint.__init__c                 C  r+   )zT
        The value representing the size of the bubble for this data point.
        )r   r    r   r   r   r   [  r   zBubbleDataPoint.bubble_size)rC   rD   rE   rF   r   rG   r   rH   r   r   r   r   r   Q  s
    r   ) rF   
__future__r   r   collections.abcr   numbersr   pptx.chart.xlsxr   r   r   pptx.chart.xmlwriterr   	pptx.utilr	   r
   rI   objectre   rh   rs   r|   r   rl   r   r   r   r   r   r   r   r   r   r   r   <module>   s0    ofW (t	2!'