viz: full range x axis scroll (#13459)

This commit is contained in:
qazal
2025-11-26 21:28:07 +08:00
committed by GitHub
parent c12e218751
commit b63e5a7568

View File

@@ -430,7 +430,7 @@ async function renderProfiler(path, unit, opts) {
// rescale to match current zoom
const xscale = d3.scaleLinear().domain([data.first, dur]).range([0, canvasWidth]);
const visibleX = xscale.range().map(zoomLevel.invertX, zoomLevel).map(xscale.invert, xscale);
const st = visibleX[0] < 0 ? 0 : visibleX[0], et = visibleX[1];
const st = visibleX[0], et = visibleX[1];
xscale.domain([st, et]);
ctx.textBaseline = "middle";
// draw shapes