Published
Edited
Aug 2, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function yAxis({svg}){
let yAxis = g => g
.attr("transform", `translate(${margins.left},0)`)
.call(d3.axisLeft(yscale).ticks(10))
svg.append("g")
.attr("class","yaxis")
.style("font", "10px helvetica")
.style("stroke-width", "0.5px")
.call(yAxis)
.call(g => g.select("path").remove ());
svg.selectAll(".yaxis g.tick line")
.attr("x2",dimensions.width)
.attr("stroke", "black")
.attr("stroke-width", "1.5px")
.attr("opacity",0.2);
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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