Public
Edited
May 10, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
scale = d3
.scaleLinear()
.domain([selected.min, selected.max])
.range([10, width - 20])
Insert cell
axis = d3.axisBottom(scale)
Insert cell
Insert cell
{
const svg = d3.select("#svg").attr("height", 40).attr("width", width);

// svg
// .selectAll("text")
// .data([selected.value, selected.mid])
// .join("text")
// .attr("x", (d) => scale(d))
// .attr("y", 20)
// .text((d) => d)
// .style("fill", "black");

svg.select("#axis").transition().duration(1000).call(axis);
}
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