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.
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(
data.filter(
"""
['AT', 'BE', 'CY', 'DE', 'DK', 'EE', 'EL', 'ES', 'FI', 'FR', 'IT', 'NL', 'SE']
.includes(record.Country_code)
"""
),
Config(
{
"channels": {
"x": {"set": ["Year"]},
"y": {"set": ["Value 2 (+)", "Country"]},
"noop": {"set": ["Country"]},
},
"title": "Column Chart",
"geometry": "rectangle",
}
),
)
chart.animate(
Config(
{
"channels": {
"y": {"range": {"max": "100%"}},
"color": {"set": ["Country"]},
"noop": {"set": None},
},
"title": "Trellis Column Chart",
"split": True,
}
)
)
chart.animate(
Config(
{
"channels": {"y": {"range": {"max": "auto"}}},
"title": "Stacked Column Chart",
"split": False,
}
)
)
chart.animate(Config({"title": "100% Column Chart", "align": "stretch"}))
Back to the Examples ----- Back to the Table of contents