B
    ÎY™  ã               @   sR   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddd	„Z	G d
d„ deƒZ
dS )zùThis is the Bokeh charts interface. It gives you a high level API
to build complex plot is a simple way.

This is the Area builder which lets you build your Area charts
just passing the arguments to the Chart class and calling the proper
functions.
é    )Úabsolute_import)Úcreate_and_build)Ú	AreaGlyphé   )ÚLineBuilderNc             K   s   ||d< ||d< t t| f|ŽS )aÐ   Create an area chart using :class:`AreaBuilder
    <bkcharts.builders.area_builder.AreaBuilder>` to render the
    geometry from values.

    Args:
        data (:ref:`userguide_charts_data_types`): table-like data
        x (str or list(str), optional): the column label to use for the x dimension
        y (str or list(str), optional): the column label to use for the y dimension

    In addition the the parameters specific to this chart,
    :ref:`userguide_charts_defaults` are also accepted as keyword parameters.

    Returns:
        :class:`Chart`: includes glyph renderers that generate the area glyphs

    Examples:

    .. bokeh-plot::
        :source-position: above

        from bkcharts import Area, show, output_file

        # create some example data
        data = dict(
            python=[2, 3, 7, 5, 26, 221, 44, 233, 254, 265, 266, 267, 120, 111],
            pypy=[12, 33, 47, 15, 126, 121, 144, 233, 254, 225, 226, 267, 110, 130],
            jython=[22, 43, 10, 25, 26, 101, 114, 203, 194, 215, 201, 227, 139, 160],
        )

        area = Area(data, title="Area Chart", legend="top_left",
                    xlabel='time', ylabel='memory')

        output_file('area.html')
        show(area)

    ÚxÚy)r   ÚAreaBuilder)Údatar   r   Zkws© r   ú=lib/python3.7/site-packages/bkcharts/builders/area_builder.pyÚArea   s    %r   c               @   s   e Zd ZdZeZdS )r	   aŒ  This is the Area builder and it is in charge of generating
    glyph renderers that together produce an area chart.

    Essentially, we provide a way to ingest the data, make the proper
    calculations and push the references into a source object.
    We additionally make calculations for the ranges. And finally add
    the needed glyphs (markers) taking the references from the source.

    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Zglyphr   r   r   r   r	   H   s   	r	   )NNN)r   Z
__future__r   Zbkcharts.builderr   Zbkcharts.glyphsr   Zline_builderr   r   r	   r   r   r   r   Ú<module>   s   
*