Reputation: 115
I've created function to calculate the percentage of delay and over achieve in percentage for multiple staff but I don't know how to visualize it
For example :
John : (60.0,40.0) # 60.0 delay and 40 percent over achieve
Ellen : (45.0,55.0)
how can i visualize it like the picture attached
Upvotes: 0
Views: 1833
Reputation: 1177
You can use pandas:
import pandas as pd
import seaborn as sns
sns.set()
df = pd.DataFrame([(60,40), (45, 55)], columns=['delay', 'overachive'],
index=['John', 'Ellen'])
df['delay'] = -df['delay']
df.plot(kind='bar', stacked=True);
Upvotes: 2