def update_graph_bar(named_count,**kwargs):
traces = list()
df = pd.DataFrame(list(Message.objects.all().values()))
available_indicators = list(df['content'].unique())
for t in available_indicators:
traces.append(go.Bar(
x=[t],
y=[df[df['content']==t]['timestamp'].count()],
name='{}'.format(t),text=[df[df['content']==t]['timestamp'].count()],
textposition='auto'
))
layout = plotly.graph_objs.Layout(barmode='group',paper_bgcolor='#00FFFF',
plot_bgcolor='rgba(0,0,0,0)',)
return {'data': traces,
'layout': layout}
I have the above code and here I want to introduce colorcoding using 'marker' in such a way that the color of bargraph should be dependent on its value. as the value increases the color should also change.



