Skip to content

Column to Waterfall

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)
  • add the existing Dimension to the Y-axis as well
  • + here is an example of how you can set a colorGradient palette in the Style
chart.animate(
    Config(
        {
            "channels": {
                "x": "Year",
                "y": "Value 5 (+/-)",
                "color": {
                    "set": "Value 5 (+/-)",
                    "range": {"min": "-45", "max": "45"},
                },
                "noop": "Country",
                "label": "Value 5 (+/-)",
            },
            "legend": "color",
        }
    ),
    Style(
        {
            "plot": {
                "marker": {
                    "colorGradient": "#ac1727 0,#e36c56 0.15,#f4b096 0.35,#d5d7d9 0.5,#9fbffa 0.65,#6389ec 0.85,#3d51b8 1",
                    "label": {"position": "top"},
                }
            }
        }
    ),
)

chart.animate(Config({"channels": {"y": ["Year", "Value 5 (+/-)"]}}))