This post describes how to build a histogram with colored tail. It follows the previous basic histogram. An if-else statement is made when the color argument is called. Annotation are also provided. See many other examples in the histogram section of the gallery. This example works with d3.js v4 and v6
if-else statement when setting the fill argument of the rect.line and a text.