Hi,
this depends a bit on how the data is currently prepared to show what it does.
you have to play around with the advanced configuration tab:
have a look at these
https://mydemoversion8-sandbox.mxapps.io/p/charts
https://plotly.com/javascript/bar-charts/
as well as the reference sheet.
https://plotly.com/javascript/reference/bar/#bar-marker-colorbar