Note
Go to the end to download the full example code.
Basic Line Chart#
Generate a line chart with 2 series and general x and y-axis configurations via the chart function.
Each
seriesreferences a column of the input dataframe.By default the series
mode="lines"for a line chartMultiple lines series are not stacked on the x-axis
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",
),
series(
column_name="china",
label="China",
color="light-blue",
),
],
)
fig
Total running time of the script: (0 minutes 0.018 seconds)