U
    cc                     @   s(   d dl mZ d dlZG dd deZdS )    )BaseLayoutHierarchyTypeNc                       s   e Zd ZdZdZddddddhZed	d
 Zejdd
 Zedd Z	e	jdd Z	edd Z
e
jdd Z
edd Zejdd Zedd Zejdd Zedd Zejdd Zedd Zd  fdd	Z  ZS )!MarginZlayoutzlayout.margin
autoexpandblpadrtc                 C   s   | d S )aT  
        Turns on/off margin expansion computations. Legends, colorbars,
        updatemenus, sliders, axis rangeselector and rangeslider are
        allowed to push the margins by defaults.

        The 'autoexpand' property must be specified as a bool
        (either True, or False)

        Returns
        -------
        bool
        r    selfr
   r
   Z/var/www/html/project/venv/lib/python3.8/site-packages/plotly/graph_objs/layout/_margin.pyr      s    zMargin.autoexpandc                 C   s   || d< d S )Nr   r
   r   valr
   r
   r   r      s    c                 C   s   | d S )z
        Sets the bottom margin (in px).

        The 'b' property is a number and may be specified as:
          - An int or float in the interval [0, inf]

        Returns
        -------
        int|float
        r   r
   r   r
   r
   r   r   %   s    zMargin.bc                 C   s   || d< d S )Nr   r
   r   r
   r
   r   r   3   s    c                 C   s   | d S )z
        Sets the left margin (in px).

        The 'l' property is a number and may be specified as:
          - An int or float in the interval [0, inf]

        Returns
        -------
        int|float
        r   r
   r   r
   r
   r   r   9   s    zMargin.lc                 C   s   || d< d S )Nr   r
   r   r
   r
   r   r   G   s    c                 C   s   | d S )a  
        Sets the amount of padding (in px) between the plotting area
        and the axis lines

        The 'pad' property is a number and may be specified as:
          - An int or float in the interval [0, inf]

        Returns
        -------
        int|float
        r   r
   r   r
   r
   r   r   M   s    z
Margin.padc                 C   s   || d< d S )Nr   r
   r   r
   r
   r   r   \   s    c                 C   s   | d S )z
        Sets the right margin (in px).

        The 'r' property is a number and may be specified as:
          - An int or float in the interval [0, inf]

        Returns
        -------
        int|float
        r   r
   r   r
   r
   r   r   b   s    zMargin.rc                 C   s   || d< d S )Nr   r
   r   r
   r
   r   r   p   s    c                 C   s   | d S )z
        Sets the top margin (in px).

        The 't' property is a number and may be specified as:
          - An int or float in the interval [0, inf]

        Returns
        -------
        int|float
        r	   r
   r   r
   r
   r   r	   v   s    zMargin.tc                 C   s   || d< d S )Nr	   r
   r   r
   r
   r   r	      s    c                 C   s   dS )Na7          autoexpand
            Turns on/off margin expansion computations. Legends,
            colorbars, updatemenus, sliders, axis rangeselector and
            rangeslider are allowed to push the margins by
            defaults.
        b
            Sets the bottom margin (in px).
        l
            Sets the left margin (in px).
        pad
            Sets the amount of padding (in px) between the plotting
            area and the axis lines
        r
            Sets the right margin (in px).
        t
            Sets the top margin (in px).
        r
   r   r
   r
   r   _prop_descriptions   s    zMargin._prop_descriptionsNc           
         s  t t| d d|kr&|d | _dS |dkr4i }n4t|| jrJ| }nt|tr`t	|}nt
d|dd| _|dd| _|d	d}	|dk	r|n|	}	|	dk	r|	| d	< |d
d}	|dk	r|n|	}	|	dk	r|	| d
< |dd}	|dk	r|n|	}	|	dk	r
|	| d< |dd}	|dk	r$|n|	}	|	dk	r:|	| d< |dd}	|dk	rT|n|	}	|	dk	rj|	| d< |dd}	|dk	r|n|	}	|	dk	r|	| d< | jf t|f| d| _dS )aH  
        Construct a new Margin object

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of :class:`plotly.graph_objs.layout.Margin`
        autoexpand
            Turns on/off margin expansion computations. Legends,
            colorbars, updatemenus, sliders, axis rangeselector and
            rangeslider are allowed to push the margins by
            defaults.
        b
            Sets the bottom margin (in px).
        l
            Sets the left margin (in px).
        pad
            Sets the amount of padding (in px) between the plotting
            area and the axis lines
        r
            Sets the right margin (in px).
        t
            Sets the top margin (in px).

        Returns
        -------
        Margin
        margin_parentNzThe first argument to the plotly.graph_objs.layout.Margin
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Margin`Zskip_invalidF	_validateTr   r   r   r   r   r	   )superr   __init__r   
isinstance	__class__Zto_plotly_jsondict_copycopy
ValueErrorpopZ_skip_invalidr   Z_process_kwargs)
r   argr   r   r   r   r   r	   kwargs_vr   r
   r   r      sR    (


	



zMargin.__init__)NNNNNNN)__name__
__module____qualname__Z_parent_path_strZ	_path_strZ_valid_propspropertyr   setterr   r   r   r   r	   r   r   __classcell__r
   r
   r    r   r      sJ   












       r   )Zplotly.basedatatypesr   Z_BaseLayoutHierarchyTyper   r   r   r
   r
   r
   r   <module>   s   