Published
Edited
Sep 19, 2019
Insert cell
md`
# @types/d3-scale
`
Insert cell
d3 = require('d3');
Insert cell
color = d3.scaleOrdinal().range(['red', 'green', 'blue'])
Insert cell
md`scaleOrdinal can takes domain undefined and null`
Insert cell
color(undefined)
Insert cell
color(null)
Insert cell
band = d3.scaleBand().range([1,2,3])
Insert cell
band(undefined)
Insert cell
band(null)
Insert cell
point = d3.scalePoint().range([10,20,30])
Insert cell
point(undefined)
Insert cell
point(null)
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more