The default for @d3/color-legend and the Observable Plot legend is to not display these end values. I hacked a very ugly workaround here using D3 to copy and add ticks: Quantile Choropleth / Evan Galloway | Observable, but I imagine there is a more elegant solution here, maybe even one using the Legend options. Any thoughts?
It seems to me that you should be able to specify the tickValues option. That seems to work for most continuous scales. The following gets close to what you want, for example:
Thanks, Mark. I had the same initial thought that tickValues would allow me to add the extent, but tickValues appears to be ignored with threshold type scales, which makes some sense since the thresholds are critically important to the legend. (You wouldn’t want a legend with numbers out of sync with the steps.)
I started tinkering with the @d3/color-legend code to allow an override, but I haven’t wrapped my head around that code yet.