
    hi$                       d 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
mZmZ ddlmZ ddlmZmZmZmZmZ  G d d	e          Z G d
 de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z d S )!zAxis-related oxml objects.    )annotations)XL_AXIS_CROSSESXL_TICK_LABEL_POSITIONXL_TICK_MARK)CT_Title)ST_AxisUnitST_LblOffsetST_Orientation)CT_TextBody)BaseOxmlElementOneAndOnlyOneOptionalAttributeRequiredAttribute	ZeroOrOnec                  j    e Zd ZdZed             Zed             Zej        d             Zd Zd Z	dS )BaseAxisElementzEBase class for catAx, dateAx, valAx, and perhaps other axis elements.c                <    |                                  }|j        }|S )zq
        ``<a:defRPr>`` great-great-grandchild element, added with its
        ancestors if not present.
        )get_or_add_txPrdefRPr)selftxPrr   s      l/var/www/development/aibuddy-work/election-extract/venv/lib/python3.11/site-packages/pptx/oxml/chart/axis.pyr   zBaseAxisElement.defRPr   s!     ##%%    c                D    | j         j        }|t          j        S |j        S )zValue of `val` attribute of `c:scaling/c:orientation` grandchild element.

        Defaults to `ST_Orientation.MIN_MAX` if attribute or any ancestors are not
        present.
        )scalingorientationr
   MIN_MAXval)r   r   s     r   r   zBaseAxisElement.orientation   s%     l.!))r   c                    | j                                          |t          j        k    r || j                                         _        dS dS )z(`value` is a member of `ST_Orientation`.N)r   _remove_orientationr
   MAX_MINget_or_add_orientationr   r   values     r   r   zBaseAxisElement.orientation+   sJ     	((***N***8=DL//11555 +*r   c                (    t          j                    S N)r   	new_titler   s    r   
_new_titlezBaseAxisElement._new_title2   s    !###r   c                (    t          j                    S r&   )r   new_txPrr(   s    r   	_new_txPrzBaseAxisElement._new_txPr5   s    #%%%r   N)
__name__
__module____qualname____doc__propertyr   r   setterr)   r,    r   r   r   r      s        OO  X 	 	 X	 > > >$ $ $& & & & &r   r   c                  *    e Zd ZdZ ede          ZdS )CT_AxisUnitz>Used for `c:majorUnit` and `c:minorUnit` elements, and others.r   N)r-   r.   r/   r0   r   r   r   r3   r   r   r5   r5   9   s&        HH

E;
/
/CCCr   r5   c                  P   e Zd ZdZdZ ed          Z ededd                   Z eded	d                   Z	 ed
edd                   Z
 ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z[dS ) CT_CatAxz,`c:catAx` element, defining a category axis.)c:axId	c:scalingc:deletec:axPosc:majorGridlinesc:minorGridlinesc:titlec:numFmtc:majorTickMarkc:minorTickMarkc:tickLblPosc:spPrc:txPr	c:crossAx	c:crossesc:crossesAtc:autoz	c:lblAlgnc:lblOffsetzc:tickLblSkipzc:tickMarkSkipzc:noMultiLvlLblc:extLstr9   r:      N
successorsr<      r=      r>      r?      r@   	   rA   
   rB      rC      rD      rF      rG      rI      r-   r.   r/   r0   _tag_seqr   r   r   delete_majorGridlinesminorGridlinestitlenumFmtmajorTickMarkminorTickMark
tickLblPosspPrr   crosses	crossesAt	lblOffsetr3   r   r   r7   r7   ?   s       66H2 mK((Gi
x|<<<GY1hqrrlKKKNY1hqrrlKKKNIiHQRRL999EYzhqrrl;;;FI/HQRRLIIIMI/HRSSMJJJM>hrssmDDDJ9X(233-888D9X(233-888Di>>>G	-HRSSMBBBI	-HRSSMBBBIr   r7   c                  ,    e Zd ZdZ edd          ZdS )CT_ChartLinesz|Used for `c:majorGridlines` and `c:minorGridlines`.

    Specifies gridlines visual properties such as color and width.
    rC   r3   rL   N)r-   r.   r/   r0   r   rd   r3   r   r   ri   ri   l   s.         
 9X"---DDDr   ri   c                  *    e Zd ZdZ ede          ZdS )
CT_CrosseszF`c:crosses` element, specifying where the other axis crosses this one.r   N)r-   r.   r/   r0   r   r   r   r3   r   r   rk   rk   u   s&        PP

E?
3
3CCCr   rk   c                  P   e Zd ZdZdZ ed          Z ededd                   Z eded	d                   Z	 ed
edd                   Z
 ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z[dS ) 	CT_DateAxz4`c:dateAx` element, defining a date (category) axis.)r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   zc:baseTimeUnitc:majorUnitzc:majorTimeUnitc:minorUnitzc:minorTimeUnitrJ   r9   r:   rK   NrL   r<   rN   r=   rO   r>   rP   r?   rQ   r@   rR   rA   rS   rB   rT   rC   rU   rD   rV   rF   rW   rG   rX   rI      rZ   r3   r   r   rm   rm   {   s       >>H4 mK((Gi
x|<<<GY1hqrrlKKKNY1hqrrlKKKNIiHQRRL999EYzhqrrl;;;FI/HQRRLIIIMI/HRSSMJJJM>hrssmDDDJ9X(233-888D9X(233-888Di>>>G	-HRSSMBBBI	-HRSSMBBBIr   rm   c                  .    e Zd ZdZ eded          ZdS )CT_LblOffsetz#`c:lblOffset` custom element class.r   d   defaultN)r-   r.   r/   r0   r   r	   r   r3   r   r   rr   rr      s+        --

E<
=
=
=CCCr   rr   c                  8    e Zd ZdZ edeej                  ZdS )CT_OrientationaC  `c:xAx/c:scaling/c:orientation` element, defining category order.

    Used to reverse the order categories appear in on a bar chart so they start at the
    top rather than the bottom. Because we read top-to-bottom, the default way looks odd
    to many and perhaps most folks. Also applicable to value and date axes.
    r   rt   N)r-   r.   r/   r0   r   r
   r   r   r3   r   r   rw   rw      s4          
E>>;Q
R
R
RCCCr   rw   c                     e Zd ZdZdZ ededd                   Z ededd                   Z ed	ed
d                   Z[e	d             Z
e
j        d             Z
e	d             Zej        d             ZdS )
CT_Scalingzm`c:scaling` element.

    Defines axis scale characteristics such as maximum value, log vs. linear, etc.
    )z	c:logBasec:orientationc:maxc:minrJ   rz      NrL   r{   rK   r|      c                &    | j         }|dS |j        S )zs
        The float value of the ``<c:max>`` child element, or |None| if no max
        element is present.
        N)maxr   )r   r   s     r   maximumzCT_Scaling.maximum        h;4wr   c                b    |                                   |dS |                     |           dS )z
        Set the value of the ``<c:max>`` child element to the float *value*,
        or remove the max element if *value* is |None|.
        Nr   )_remove_max_add_maxr#   s     r   r   zCT_Scaling.maximum   :     	=F%     r   c                &    | j         }|dS |j        S )zs
        The float value of the ``<c:min>`` child element, or |None| if no min
        element is present.
        N)minr   )r   r   s     r   minimumzCT_Scaling.minimum   r   r   c                b    |                                   |dS |                     |           dS )z
        Set the value of the ``<c:min>`` child element to the float *value*,
        or remove the min element if *value* is |None|.
        Nr   )_remove_min_add_minr#   s     r   r   zCT_Scaling.minimum   r   r   )r-   r.   r/   r0   r[   r   r   r   r   r1   r   r2   r   r3   r   r   ry   ry      s         
 LH)OEEEK
)G
5
5
5C
)G
5
5
5C  X ^! ! ^!   X ^! ! ^! ! !r   ry   c                  *    e Zd ZdZ ede          ZdS )CT_TickLblPosz`c:tickLblPos` element.r   N)r-   r.   r/   r0   r   r   r   r3   r   r   r   r      s'        !!

E#9
:
:CCCr   r   c                  8    e Zd ZdZ edeej                  ZdS )CT_TickMarkz1Used for `c:minorTickMark` and `c:majorTickMark`.r   rt   N)r-   r.   r/   r0   r   r   CROSSr   r3   r   r   r   r      s.        ;;

E<9K
L
L
LCCCr   r   c                     e Zd ZdZdZ ed          Z ededd                   Z eded	d                   Z	 ed
edd                   Z
 ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ededd                   Z ed ed!d                   Z ed"ed#d                   Z[dS )$CT_ValAxz)`c:valAx` element, defining a value axis.)r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   zc:crossBetweenrn   ro   zc:dispUnitsrJ   r9   r:   rK   NrL   r<   rN   r=   rO   r>   rP   r?   rQ   r@   rR   rA   rS   rB   rT   rC   rU   rD   rV   rE      rF   rW   rG   rX   rn   rp   ro   rY   )r-   r.   r/   r0   r[   r   r   r   r\   r]   r^   r_   r`   ra   rb   rc   rd   r   crossAxre   rf   	majorUnit	minorUnitr3   r   r   r   r      s       33H. mK((Gi
x|<<<GY1hqrrlKKKNY1hqrrlKKKNIiHQRRL999EYzhqrrl;;;FI/HQRRLIIIMI/HRSSMJJJM>hrssmDDDJ9X(233-888D9X(233-888Di>>>Gi>>>G	-HRSSMBBBI	-HRSSMBBBI	-HRSSMBBBIr   r   N)!r0   
__future__r   pptx.enum.chartr   r   r   pptx.oxml.chart.sharedr   pptx.oxml.simpletypesr   r	   r
   pptx.oxml.textr   pptx.oxml.xmlchemyr   r   r   r   r   r   r5   r7   ri   rk   rm   rr   rw   ry   r   r   r   r3   r   r   <module>r      s       " " " " " " Q Q Q Q Q Q Q Q Q Q + + + + + + K K K K K K K K K K & & & & & &             $& $& $& $& $&o $& $& $&N0 0 0 0 0/ 0 0 0* * * * * * * *Z. . . . .O . . .4 4 4 4 4 4 4 4+ + + + + + + +\> > > > >? > > >S S S S S_ S S S6! 6! 6! 6! 6! 6! 6! 6!r; ; ; ; ;O ; ; ;M M M M M/ M M M* * * * * * * * * *r   