Using colorscale with histograms

Hi fellow enthusiasts!

I’m working with Histograms, and trying to use the ‘colorscale’ marker property. However, I’m finding it difficult to figure out how to actually use this. Basically, what I want to do is apply the color scale across the whole histogram. (kinda like a rainbow from one end to the other). Right now, I have:
marker: { color: [min, max], colorscale: "Jet" }

This isn’t working, and I suspect this is because I am using these two properties wrong. Would someone please give me some insight into how to correctly use this property?



You have to list the bins values in the color attribute in a array, not just the min and max for this to work:

See example here:

and plotly.js code here: