o
    -wiA	                     @  sR   d dl mZ d dlmZ d dlmZ erd dlZd dlmZ 			ddddZdS )    )annotations)TYPE_CHECKING
plot_tableN)CustomChart Ftablewandb.Tablexstrystroke
str | Nonetitlesplit_tableboolreturnr   c                 C  s   t | d|||dd|i|dS )a  Constructs a customizable line chart.

    Args:
        table:  The table containing data for the chart.
        x: Column name for the x-axis values.
        y: Column name for the y-axis values.
        stroke: Column name to differentiate line strokes (e.g., for
            grouping lines).
        title: Title of the chart.
        split_table: Whether the table should be split into a separate section
            in the W&B UI. If `True`, the table will be displayed in a section named
            "Custom Chart Tables". Default is `False`.

    Returns:
       CustomChart: A custom chart object that can be logged to W&B. To log the
            chart, pass it to `wandb.log()`.

    Example:

    ```python
    import math
    import random
    import wandb

    # Create multiple series of data with different patterns
    data = []
    for i in range(100):
        # Series 1: Sinusoidal pattern with random noise
        data.append([i, math.sin(i / 10) + random.uniform(-0.1, 0.1), "series_1"])
        # Series 2: Cosine pattern with random noise
        data.append([i, math.cos(i / 10) + random.uniform(-0.1, 0.1), "series_2"])
        # Series 3: Linear increase with random noise
        data.append([i, i / 10 + random.uniform(-0.5, 0.5), "series_3"])

    # Define the columns for the table
    table = wandb.Table(data=data, columns=["step", "value", "series"])

    # Initialize wandb run and log the line chart
    with wandb.init(project="line_chart_example") as run:
        line_chart = wandb.plot.line(
            table=table,
            x="step",
            y="value",
            stroke="series",  # Group by the "series" column
            title="Multi-Series Line Plot",
        )
        run.log({"line-chart": line_chart})
    ```
    zwandb/line/v0)r
   r   r   r   )
data_tablevega_spec_namefieldsstring_fieldsr   r   )r   r
   r   r   r   r    r   L/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/wandb/plot/line.pyline   s   9
r   )Nr   F)r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   )	
__future__r   typingr   wandb.plot.custom_chartr   wandbr   r   r   r   r   r   <module>   s    