Hi,
I’m trying to reproduce the exemple of Map for range and domain in Observable documentation (https://observablehq.com/@d3/d3-scaleordinal) :
atoms = new Map([["C", 12], ["H", 1], ["O", 16]])
colors = new Map([["C", "black"], ["H", "white"], ["O", "blue"]])
m = d3.scaleOrdinal()
.domain(atoms.keys())
.range(colors.values())
m("C")
Using d3 = require("d3-scale@3", "d3-scale-chromatic@1", "d3-shape@1", "d3-array@2")
it works, but in my observable notebook i use d3@5
and this exemple return “undefined”
What is the equivalent of this exemple in d3@5 ?