B
    &[_(                 @   s(   d dl mZ d dlZG dd deZdS )    )BaseTraceHierarchyTypeNc                   s   e Zd ZdZdZd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ejdd Zedd  Zd$ fd"d#	Z  ZS )%DeltaZ	indicatorzindicator.delta
decreasingfont
increasingposition	referencerelativevalueformatc             C   s   | d S )ad  
        The 'decreasing' property is an instance of Decreasing
        that may be specified as:
          - An instance of :class:`plotly.graph_objs.indicator.delta.Decreasing`
          - A dict of string/value properties that will be passed
            to the Decreasing constructor
    
            Supported dict properties:
                
                color
                    Sets the color for increasing value.
                symbol
                    Sets the symbol to display for increasing value

        Returns
        -------
        plotly.graph_objs.indicator.delta.Decreasing
        r    )selfr   r   F/tmp/pip-install-l29rncou/plotly/plotly/graph_objs/indicator/_delta.pyr      s    zDelta.decreasingc             C   s   || d< d S )Nr   r   )r   valr   r   r   r   -   s    c             C   s   | d S )a  
        Set the font used to display the delta
    
        The 'font' property is an instance of Font
        that may be specified as:
          - An instance of :class:`plotly.graph_objs.indicator.delta.Font`
          - A dict of string/value properties that will be passed
            to the Font constructor
    
            Supported dict properties:
                
                color
    
                family
                    HTML font family - the typeface that will be
                    applied by the web browser. The web browser
                    will only be able to apply a font if it is
                    available on the system which it operates.
                    Provide multiple font families, separated by
                    commas, to indicate the preference in which to
                    apply fonts if they aren't available on the
                    system. The Chart Studio Cloud (at
                    https://chart-studio.plotly.com or on-premise)
                    generates images on a server, where only a
                    select number of fonts are installed and
                    supported. These include "Arial", "Balto",
                    "Courier New", "Droid Sans",, "Droid Serif",
                    "Droid Sans Mono", "Gravitas One", "Old
                    Standard TT", "Open Sans", "Overpass", "PT Sans
                    Narrow", "Raleway", "Times New Roman".
                size

        Returns
        -------
        plotly.graph_objs.indicator.delta.Font
        r   r   )r   r   r   r   r   3   s    &z
Delta.fontc             C   s   || d< d S )Nr   r   )r   r   r   r   r   r   [   s    c             C   s   | d S )ad  
        The 'increasing' property is an instance of Increasing
        that may be specified as:
          - An instance of :class:`plotly.graph_objs.indicator.delta.Increasing`
          - A dict of string/value properties that will be passed
            to the Increasing constructor
    
            Supported dict properties:
                
                color
                    Sets the color for increasing value.
                symbol
                    Sets the symbol to display for increasing value

        Returns
        -------
        plotly.graph_objs.indicator.delta.Increasing
        r   r   )r   r   r   r   r   a   s    zDelta.increasingc             C   s   || d< d S )Nr   r   )r   r   r   r   r   r   w   s    c             C   s   | d S )a.  
        Sets the position of delta with respect to the number.
    
        The 'position' property is an enumeration that may be specified as:
          - One of the following enumeration values:
                ['top', 'bottom', 'left', 'right']

        Returns
        -------
        Any
        r   r   )r   r   r   r   r   }   s    zDelta.positionc             C   s   || d< d S )Nr   r   )r   r   r   r   r   r      s    c             C   s   | d S )a  
        Sets the reference value to compute the delta. By default, it
        is set to the current value.
    
        The 'reference' property is a number and may be specified as:
          - An int or float

        Returns
        -------
        int|float
        r   r   )r   r   r   r   r      s    zDelta.referencec             C   s   || d< d S )Nr   r   )r   r   r   r   r   r      s    c             C   s   | d S )z
        Show relative change
    
        The 'relative' property must be specified as a bool
        (either True, or False)

        Returns
        -------
        bool
        r	   r   )r   r   r   r   r	      s    zDelta.relativec             C   s   || d< d S )Nr	   r   )r   r   r   r   r   r	      s    c             C   s   | d S )a  
        Sets the value formatting rule using d3 formatting mini-
        language which is similar to those of Python. See
        https://github.com/d3/d3-3.x-api-
        reference/blob/master/Formatting.md#d3_format
    
        The 'valueformat' property is a string and must be specified as:
          - A string
          - A number that will be converted to a string

        Returns
        -------
        str
        r
   r   )r   r   r   r   r
      s    zDelta.valueformatc             C   s   || d< d S )Nr
   r   )r   r   r   r   r   r
      s    c             C   s   dS )Nas          decreasing
            :class:`plotly.graph_objects.indicator.delta.Decreasing
            ` instance or dict with compatible properties
        font
            Set the font used to display the delta
        increasing
            :class:`plotly.graph_objects.indicator.delta.Increasing
            ` instance or dict with compatible properties
        position
            Sets the position of delta with respect to the number.
        reference
            Sets the reference value to compute the delta. By
            default, it is set to the current value.
        relative
            Show relative change
        valueformat
            Sets the value formatting rule using d3 formatting
            mini-language which is similar to those of Python. See
            https://github.com/d3/d3-3.x-api-
            reference/blob/master/Formatting.md#d3_format
        r   )r   r   r   r   _prop_descriptions   s    zDelta._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< |dd}
|dk	r|n|
}
|
dk	r|
| d< | jf t|f|	 d| _dS )a  
        Construct a new Delta object
        
        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of
            :class:`plotly.graph_objs.indicator.Delta`
        decreasing
            :class:`plotly.graph_objects.indicator.delta.Decreasing
            ` instance or dict with compatible properties
        font
            Set the font used to display the delta
        increasing
            :class:`plotly.graph_objects.indicator.delta.Increasing
            ` instance or dict with compatible properties
        position
            Sets the position of delta with respect to the number.
        reference
            Sets the reference value to compute the delta. By
            default, it is set to the current value.
        relative
            Show relative change
        valueformat
            Sets the value formatting rule using d3 formatting
            mini-language which is similar to those of Python. See
            https://github.com/d3/d3-3.x-api-
            reference/blob/master/Formatting.md#d3_format

        Returns
        -------
        Delta
        delta_parentNzThe first argument to the plotly.graph_objs.indicator.Delta 
constructor must be a dict or 
an instance of :class:`plotly.graph_objs.indicator.Delta`Zskip_invalidF	_validateTr   r   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	   r
   kwargsZ_v)r   r   r   r      sX    .







zDelta.__init__)NNNNNNNN)__name__
__module____qualname__Z_parent_path_strZ	_path_strZ_valid_propspropertyr   setterr   r   r   r   r	   r
   r   r   __classcell__r   r   )r   r   r      s@   (       r   )Zplotly.basedatatypesr   Z_BaseTraceHierarchyTyper   r   r   r   r   r   r   <module>   s   