The stories for the ColorLegend component suggest reversing the direction in which the legend is drawn by reversing the domain. This doesn't actually work for threshold scales: the legend looks ok, but the scale function might not work correctly.
The docs for threshold.define state: "The values must be in ascending order or the behavior of the scale is undefined".
The stories for the
ColorLegend
component suggest reversing the direction in which the legend is drawn by reversing the domain. This doesn't actually work for threshold scales: the legend looks ok, but the scale function might not work correctly.The docs for
threshold.define
state: "The values must be in ascending order or the behavior of the scale is undefined".