Basic Bar Chart#

Generate a bar chart with 2 series and general x and y-axis configurations via the chart function.

  • Each series references a column of the input dataframe.

  • The series argument mode="bar" indicates that the series is a bar chart to plot

  • Multiple series are placed next to each other and not stacked by default.



import pandas as pd

from visualization_toolkit.helpers.plotly import chart, axis, series


fig = chart(
    pdf,
    x_axis=axis(column_name="fiscal_qy", label="Fiscal Quarter"),
    y1_axis=axis(label="Downloads", axis_type="number"),
    chart_series=[
        series(
            column_name="ucan",
            label="UCAN",
            color="dark-blue",
            mode="bar",
        ),
        series(
            column_name="china",
            label="China",
            color="light-blue",
            mode="bar",
        ),
    ],
)

fig

Total running time of the script: (0 minutes 0.019 seconds)

Gallery generated by Sphinx-Gallery