Note: The data used in this example is available here. You can read more about the available types of data in the Adding data chapter.

In [1]:
import pandas as pd
from ipyvizzu import Chart, Data, Config, Style

data_frame = pd.read_csv(
    "../../data/tutorial.csv", dtype={"Year": str, "Timeseries": str}
)
data = Data()
data.add_data_frame(data_frame)

chart = Chart()
chart.animate(data)

chart.animate(
    Config(
        {
            "channels": {
                "x": {"set": ["Timeseries"]},
                "y": {"set": ["Values 1", "Categ. Parent"], "range": {"max": "400"}},
                "label": {"set": ["Values 1"]},
                "color": {"set": ["Categ. Parent"]},
            },
            "title": "Stacked Area Chart",
            "geometry": "area",
        }
    )
)
In [2]:
chart.animate(
    Config(
        {
            "channels": {"y": {"set": ["Values 1"]}},
            "title": "Line Chart",
            "geometry": "line",
        }
    )
)
In [3]:
chart.animate(Config({"channels": {"y": {"range": {"max": "auto"}}}}))

Back to the Examples ----- Back to the Table of contents