'How to Make a Funnel Graph in Dash with a breakup in the last tab?
What changes should I made in the code so that the graph becomes connected?(I want a picture like this but the last section(Agent/Amelia Breakup) is the subsection of the second last(Total Hours one.)
P.S. I want to retain the different colors(Red and Green)
import pandas as pd
stages = ["Total Conversations", "Total Hours"]
stages2 = [ "Agent/Amelia Breakup"]
df_total = pd.DataFrame(dict(number=[39, 27.4], stage=stages))
df_total['handled'] = 'Total'
df_agent = pd.DataFrame(dict(number=[13], stage=stages2))
df_agent['handled'] = 'Agent'
df_amelia = pd.DataFrame(dict(number=[13], stage=stages2))
df_amelia['handled'] = 'Amelia'
df = pd.concat([df_total, df_agent, df_amelia], axis=0)
fig = px.funnel(df, x='number', y='stage', color='handled')
fig.show()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

