How to display a hyphen in a graph?

D3 did use the minus sign originally, but people complained about that, too (e.g., #595), primarily because there was an expectation that d3.format would use the same symbol as JavaScript’s number.toString. The minus sign was thus replaced with hyphen-minus in 2.10.0 (da3131c, #756). (As you know, because you already commented on that commit.)

I’m somewhat ambivalent. Both are technically correct. I’m aware that hyphen-minus is a compromise from a time where good typesetting was largely impractical for computers. As I commented on the linked issue, I don’t think it’s reasonable to expect d3.format to be compatible with JavaScript’s number coercion, since the goal of d3.format is to format numbers for human consumption instead of machines.

At any rate, we should at least allow you to override the minus sign in the locale, and perhaps it is worth reverting the adoption of hyphen-minus. Probably better to discuss this over in d3-format than the Observable forum. :slight_smile: