
    ~Zi                    n   S r SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
JrJr  SSKJr  SSKJr  SS	KJr   " S
 S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\\5      r " S S\5      r " S S\\5      r " S S\\5      r " S S\5      r " S S\5      rS  rg!)"zSeries-related objects.    )annotations)Sequence)
DataLabels)Marker)BubblePointsCategoryPointsXyPoints)ChartFormat)qn)lazypropertyc                  \   ^  \ rS rSrSrU 4S jr\S 5       r\S 5       r	\S 5       r
SrU =r$ )_BaseSeries   z6
Base class for |BarSeries| and other series classes.
c                B   > [         [        U ]  5         Xl        Xl        g N)superr   __init___element_ser)selfser	__class__s     k/var/www/eduai.edurigo.com/question_generate/ques_gen_env/lib/python3.13/site-packages/pptx/chart/series.pyr   _BaseSeries.__init__   s    k4)+	    c                ,    [        U R                  5      $ )zi
The |ChartFormat| instance for this series, providing access to shape
properties such as fill and line.
)r
   r   r   s    r   format_BaseSeries.format   s     499%%r   c                B    U R                   R                  R                  $ )zW
The zero-based integer index of this series as reported in its
`c:ser/c:idx` element.
)r   idxvalr   s    r   index_BaseSeries.index!   s     }}  $$$r   c                \    U R                   R                  S5      nU(       a  US   nU$ SnU$ )z
The string label given to this series, appears as the title of the
column for this series in the Excel worksheet. It also appears as the
label for this series in the legend.
z./c:tx//c:pt/c:v/text()r    )r   xpath)r   namesnames      r   r)   _BaseSeries.name)   s5     ##$=> uQx ')r   )r   r   )__name__
__module____qualname____firstlineno____doc__r   r   r   propertyr#   r)   __static_attributes____classcell__r   s   @r   r   r      sI    
 & & % %  r   r   c                  H    \ rS rSrSr\S 5       r\S 5       r\S 5       r	Sr
g)_BaseCategorySeries5   zCBase class for |BarSeries| and other category chart series classes.c                H    [        U R                  R                  5       5      $ )z<|DataLabels| object controlling data labels for this series.)r   r   get_or_add_dLblsr   s    r   data_labels_BaseCategorySeries.data_labels8   s     $))44677r   c                ,    [        U R                  5      $ )zX
The |CategoryPoints| object providing access to individual data
points in this series.
)r   r   r   s    r   points_BaseCategorySeries.points=   s     dii((r   c                0   ^  U 4S jn[        U" 5       5      $ )k
Read-only. A sequence containing the float values for this series, in
the order they appear on the chart.
c               3     >#    TR                   R                  n U c  g [        U R                  5       H  nU R	                  U5      v   M     g 7fr   )r   r"   rangeptCount_valpt_v)r"   r!   r   s     r   iter_values/_BaseCategorySeries.values.<locals>.iter_valuesL   s>     --##C{S__-hhsm# .s   AA)tuple)r   rD   s   ` r   values_BaseCategorySeries.valuesE   s    	$ []##r    N)r+   r,   r-   r.   r/   r   r9   r<   r0   rG   r1   rI   r   r   r5   r5   5   s?    M8 8 ) ) $ $r   r5   c                  (    \ rS rSrSr\S 5       rSrg)_MarkerMixinV   zt
Mixin class providing `.marker` property for line-type chart series. The
line-type charts are Line, XY, and Radar.
c                ,    [        U R                  5      $ )a  
The |Marker| instance for this series, providing access to data point
marker properties such as fill and line. Setting these properties
determines the appearance of markers for all points in this series
that are not overridden by settings at the point level.
)r   r   r   s    r   marker_MarkerMixin.marker\   s     dii  r   rI   N)r+   r,   r-   r.   r/   r   rN   r1   rI   r   r   rK   rK   V   s    
 ! !r   rK   c                      \ rS rSrSrSrg)
AreaSeriesg   z0
A data point series belonging to an area plot.
rI   Nr+   r,   r-   r.   r/   r1   rI   r   r   rQ   rQ   g       r   rQ   c                  L    \ rS rSrSr\S 5       r\R                  S 5       rSrg)	BarSeriesm   z,A data point series belonging to a bar plot.c                N    U R                   R                  nUc  gUR                  $ )a  
|True| if a point having a value less than zero should appear with a
fill different than those with a positive value. |False| if the fill
should be the same regardless of the bar's value. When |True|, a bar
with a solid fill appears with white fill; in a bar with gradient
fill, the direction of the gradient is reversed, e.g. dark -> light
instead of light -> dark. The term "invert" here should be understood
to mean "invert the *direction* of the *fill gradient*".
T)r   invertIfNegativer"   )r   rY   s     r   invert_if_negativeBarSeries.invert_if_negativep   s)      ==99####r   c                D    U R                   R                  5       nXl        g r   )r   get_or_add_invertIfNegativer"   )r   valuerY   s      r   rZ   r[      s    ==DDF$r   rI   N)	r+   r,   r-   r.   r/   r0   rZ   setterr1   rI   r   r   rV   rV   m   s1    6$ $ % %r   rV   c                  L    \ rS rSrSr\S 5       r\R                  S 5       rSrg)
LineSeries   z/
A data point series belonging to a line plot.
c                N    U R                   R                  nUc  gUR                  $ )z
Read/write boolean specifying whether to use curve smoothing to
form the line connecting the data points in this series into
a continuous curve. If |False|, a series of straight line segments
are used to connect the points.
T)r   smoothr"   )r   rd   s     r   rd   LineSeries.smooth   s%     %%>zzr   c                @    XR                   R                  5       l        g r   )r   get_or_add_smoothr"   )r   r^   s     r   rd   re      s    05'')-r   rI   N)	r+   r,   r-   r.   r/   r0   rd   r_   r1   rI   r   r   ra   ra      s3     
 
 ]]6 6r   ra   c                      \ rS rSrSrSrg)	PieSeries   z.
A data point series belonging to a pie plot.
rI   NrS   rI   r   r   ri   ri      rT   r   ri   c                      \ rS rSrSrSrg)RadarSeries   z0
A data point series belonging to a radar plot.
rI   NrS   rI   r   r   rl   rl      rT   r   rl   c                  >    \ rS rSrSrS r\S 5       r\S 5       r	Sr
g)XySeries   z8
A data point series belonging to an XY (scatter) plot.
c              #     #    U R                   R                  nUc  g[        UR                  5       H  nUR	                  U5      v   M     g7f)z
Generate each float Y value in this series, in the order they appear
on the chart. A value of `None` represents a missing Y value
(corresponding to a blank Excel cell).
N)r   yValrA   rB   rC   )r   rr   r!   s      r   rD   XySeries.iter_values   sA      }}!!<))*C))C.  +s   AAc                ,    [        U R                  5      $ )zR
The |XyPoints| object providing access to individual data points in
this series.
)r	   r   r   s    r   r<   XySeries.points   s     		""r   c                4    [        U R                  5       5      $ )r?   )rF   rD   r   s    r   rG   XySeries.values   s     T%%'((r   rI   N)r+   r,   r-   r.   r/   rD   r   r<   r0   rG   r1   rI   r   r   ro   ro      s4    ! # # ) )r   ro   c                  (    \ rS rSrSr\S 5       rSrg)BubbleSeries   z1
A data point series belonging to a bubble plot.
c                ,    [        U R                  5      $ )z
The |BubblePoints| object providing access to individual data point
objects used to discover and adjust the formatting and data labels of
a data point.
)r   r   r   s    r   r<   BubbleSeries.points   s     DII&&r   rI   N)r+   r,   r-   r.   r/   r   r<   r1   rI   r   r   ry   ry      s     ' 'r   ry   c                  8   ^  \ rS rSrSrU 4S jrS rS rSrU =r	$ )SeriesCollection   z!
A sequence of |Series| objects.
c                6   > [         [        U ]  5         Xl        g r   )r   r~   r   r   )r   
parent_elmr   s     r   r   SeriesCollection.__init__   s    .0"r   c                J    U R                   R                  U   n[        U5      $ r   )r   sers_SeriesFactory)r   r#   r   s      r   __getitem__SeriesCollection.__getitem__   s!    mm  'c""r   c                @    [        U R                  R                  5      $ r   )lenr   r   r   s    r   __len__SeriesCollection.__len__   s    4==%%&&r   )r   )
r+   r,   r-   r.   r/   r   r   r   r1   r2   r3   s   @r   r~   r~      s    #
#' 'r   r~   c                z   U R                  5       R                  n [        S5      [        [        S5      [        [        S5      [
        [        S5      [        [        S5      [        [        S5      [        [        S5      [        [        S5      [        0U   nU" U 5      $ ! [         a    [        S	U-  5      ef = f)
zm
Return an instance of the appropriate subclass of _BaseSeries based on the
xChart element *ser* appears in.
zc:areaChartz
c:barChartzc:bubbleChartzc:doughnutChartzc:lineChartz
c:pieChartzc:radarChartzc:scatterChartz'series class for %s not yet implemented)	getparenttagr   rQ   rV   ry   ri   ra   rl   ro   KeyErrorNotImplementedError)r   
xChart_tag	SeriesClss      r   r   r      s    
 $$JZ}z|i !9}z|i~ (	
 		 S>  Z!"Kj"XYYZs   A=B! !B:N) r/   
__future__r   collections.abcr   pptx.chart.datalabelr   pptx.chart.markerr   pptx.chart.pointr   r   r	   pptx.dml.chtfmtr
   pptx.oxml.nsr   	pptx.utilr   objectr   r5   rK   rQ   rV   ra   ri   rl   ro   ry   r~   r   rI   r   r   <module>r      s     " $ + $ C C '  "#& #L$+ $B!6 !"$ %# %26$l 6.# %|  ){L  )F'8 ''x '$r   