Bubble to Column
Info - How to setup Chart
import pandas as pd
from ipyvizzu import Chart, Data, Config, Style
df = pd.read_csv(
"https://ipyvizzu.vizzuhq.com/0.17/assets/data/chart_types_eu.csv",
dtype={"Year": str, "Timeseries": str},
)
data = Data()
data.add_df(df)
chart = Chart()
chart.animate(data)
This Vizzu animation consist of 2 steps (animates):
1st:
- move the Dimension from the Label channel to the Y-axis
- move the Measure from the Size channel to the Y-axis
- add the other Dimension to the X-axis
- switch the Geometry from Circle to Rectangle
2nd:
- remove the other Dimension from the X-axis
- add the Measure to the Label channel too
chart.animate(
Config(
{
"channels": {
"color": "Joy factors",
"label": "Country_code",
"size": ["Country_code", "Value 2 (+)"],
},
"geometry": "circle",
}
)
)
chart.animate(
Config(
{
"channels": {
"x": "Joy factors",
"y": ["Country_code", "Value 2 (+)"],
"label": None,
"size": None,
},
"geometry": "rectangle",
}
)
)
chart.animate(
Config({"channels": {"y": "Value 2 (+)", "label": "Value 2 (+)"}})
)