If the change is over time, consider a stacked chart.
If only a few periods and only presents relative differences, use a stacked 100% column chart.
If only a few periods and presents relative and absolute differences, use a stacked column chart.
If it has many periods and presents relative differences, use a stacked 100% area chart.
ifit has many periods and presents relative and absolute differences, use a stacked area chart.
1. Stacked 100% Column Chart
Let's create a fruit sales dataset and calculate each items' percentage.
raw = {'time':['Q1','Q2','Q3','Q4'],
'apple':[1000,2000, 1550, 1800],
'banana':[3000,4000, 3300, 2000],
'kiwi':[500, 1200, 2800, 1500]}
df = pd.DataFrame(raw)
# From value to percentage
total = [i+j+k for i,j,k in zip(df['apple'], df['banana'], df['kiwi'])]
apple = [i / j * 100 for i,j in zip(df['apple'], total)]
banana = [i / j * 100 for i,j in zip(df['banana'], total)]
kiwi = [i / j * 100 for i,j in zip(df['kiwi'], total)]