I have created a simple histogram that is not connected to a feature. How do I add colours to each bin?
I wrote a blog article about how to do this a few years ago. The live samples are using older versions of the API, but the pattern for coloring the bins should be the same. https://www.esri.com/arcgis-blog/products/js-api-arcgis/mapping/make-your-histogram-legendary/
This blog is awesome! And I have be referencing it a lot. The only difference with my use case is that my histogram is not linked to a raster layer. Rather I build it "by hand". I found that I can make the entire histrogram a color, but not each bin.
hist.barCreatedFunction = (index = 1, element) => { element.setAttribute("fill", "#33862B")};
Also, this is out of scope for this question, but do you know if it is possible to add a Y axis that labels the frequency of the histogram?