INNER CODE UNIT · JavaScript
zoomed
sirius-ms/sirius · lcms2/viewer/viewer.js:173
function zoomed({transform}) {
svg.attr("transform", transform);
}
// Add the x-axis.
svg.append("g")
.attr("transform", `translate(0,${height - marginBottom})`)
.call(d3.axisBottom(x));
// Add the y-axis.
svg.append("g")
.attr("transform", `translate(${marginLeft},0)`)
.call(d3.axisLeft(y));
// add the data
const line = d3.line().x(d=>x(d.x)).y(d=>y(d.y))