🏠 back to Observable

hexFormat() not exported in d3?

.hexFormat() method is available when importing d3-color directly, but not d3. Is it normal? Did I miss something?

Please see the notebook: https://observablehq.com/@severo/d3-color

This is expected. The D3 modules advance ahead of the d3 default bundle. color.formatHex was added in d3-color 1.3.0 but not released until d3 5.10.0.

1 Like

OK thanks for your reply. What would be the recommended way to read the doc corresponding to the current d3 bundle?

Since May 2019 the links in the API doc point to the (at that time) included version: https://github.com/d3/d3/blob/v5.10.0/API.md

1 Like

Oh, sure! I have been working from https://github.com/d3/d3/blob/master/CHANGES.md, and it points to the master branches. But, I should have used the API.md file, thanks a lot.

D3 5.10.0 has just been released and it includes .hexFormat() :slight_smile:

Thanks @mike!

(notebook updated)