Python Dash Plotly : Customise Colour Legend When Formatting Table
I want to colour a column by labelling extreme small and large values (in Red colour) and midpoint values (in Green colour). The following is an example of colour scale legend. Ho
Solution 1:
Finally got the answer !
....
styles = []
legend = []
backgroundColors = ['rgb(215,48,39)', 'rgb(252,141,89)', 'rgb(145,207,96)', 'rgb(26,152,80)', 'rgb(145,207,96)', 'rgb(252,141,89)', 'rgb(215,48,39)']
for i in range(1, len(bounds)):
min_bound = ranges[i - 1]
max_bound = ranges[i]
backgroundColor = backgroundColors[i - 1]
color = "white" if i > len(bounds) / 2.0 else "inherit"
....
Post a Comment for "Python Dash Plotly : Customise Colour Legend When Formatting Table"