beginof
September 13, 2022, 7:21am
#1
Hi,
How to create a table/box/chart like the picture shown?
Data:
Product
Sale
Minor 1
1,000.00
Minor 2
500.00
Minor 3
2,000.00
Total
3,500.00
The line of color (eg: green in Minor 1) is the sale of each product divided by the total sale (1000 / 3500).
Can create something like this in plotly?
AIMPED
September 13, 2022, 7:48am
#2
Maybe the last example here gives you some inspiration:
beginof
September 14, 2022, 9:20am
#3
Thanks @AIMPED for the advise.
But how can I expand the background to the maximum so can fully display the amount?
And also how to add the currency such as MYR in front of each text? (eg: MYR 560.00)?
fig = px.bar(df, x=‘Sale’, y=‘Product’, title=‘Pie-Bar’ ,orientation=‘h’ ,text=‘Sale’, text_auto=‘.2f’)
fig.update_layout(barmode=“group”)
fig.update_traces(textposition=“outside”)