I have a pandas dataset with a toy version that can be created with this
#creating a toy pandas dataframe s1 = pd.Series(['dont have a mortgage',-31.8,'have mortgage',15.65]) s2 = pd.Series(['have utility bill arrears',-21.45,'',0]) s3 = pd.Series(['have interest only mortgage',-19.59,'',0]) s4 = pd.Series(['bank with challenger bank',-19.24,'bank with a traditional bank',32.71]) df = pd.DataFrame([list(s1),list(s2),list(s3),list(s4)], columns = ['label1','value1','label2','value2'])
I want to create a bar chart that looks like this version I hacked together in excel
I want to be able to supply RGB values to customise the two colours for the left and right bars (currently blue and orange)
I tried different versions using “fig.add_trace(go.Bar” but am brand new to plotly and cant get anything to work with different coloured bars on one row with annotation under each bar.
All help greatly appreciated!