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/chart_types_eu.csv", dtype={"Year": str, "Timeseries": str}
)
data = Data()
data.add_data_frame(data_frame)

chart = Chart()
chart.animate(data)

chart.animate(
    Config(
        {
            "channels": {
                "y": {"set": ["Joy factors", "Value 2 (+)"]},
                "x": {"set": ["Year"]},
                "color": {"set": ["Joy factors"]},
            },
            "title": "Stacked Area Chart",
            "geometry": "area",
        }
    )
)
In [2]:
chart.animate(Config({"split": True, "title": "Trellis Area Chart"}))
In [3]:
chart.animate(
    Config(
        {
            "channels": {
                "y": {"set": ["Value 2 (+)", "Year"]},
                "x": {"set": ["Joy factors"]},
            },
            "title": "Column Chart",
            "geometry": "rectangle",
            "split": False,
        }
    ),
    geometry={"delay": 0.43, "duration": 1},
    y={"delay": 1, "duration": 2},
    x={"delay": 0, "duration": 1},
)
In [4]:
chart.animate(
    Config({"channels": {"y": {"detach": ["Year"]}, "label": {"set": ["Value 2 (+)"]}}})
)

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