Skip to content

Bubble and Distribution

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_data_8.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:

  • add a new Sub Dimension to the Size channel

2nd:

  • add two new Measures to the X and Y-axes
  • move the new Sub Dimension to the No-Operation (Noop) channel
  • None the Label channel
chart.animate(
    Config(
        {
            "channels": {
                "color": "Country",
                "size": "Value 2 (+)",
                "label": "Value 2 (+)",
            },
            "geometry": "circle",
        }
    )
)

chart.animate(
    Config(
        {
            "channels": {"size": ["Year", "Value 2 (+)"]},
            "geometry": "circle",
        }
    )
)

chart.animate(
    Config(
        {
            "channels": {
                "x": "Value 1 (+)",
                "y": "Value 3 (+)",
                "noop": "Year",
                "size": "Value 2 (+)",
                "label": None,
            }
        }
    )
)

chart.feature("tooltip", True)