Added markers.

This commit is contained in:
Felix Delattre 2026-01-26 09:39:53 +01:00
parent 41f363220f
commit 8dabb5aae2

View file

@ -208,6 +208,9 @@
else ctx.lineTo(px, py); else ctx.lineTo(px, py);
} }
ctx.stroke(); ctx.stroke();
ctx.fillStyle = "#888";
const axisY = pad + plotH;
for (const t of data) ctx.fillRect(x(t.date) - 1, axisY - 1, 2, 2);
const xPos = x(currentDate); const xPos = x(currentDate);
ctx.strokeStyle = "#f00"; ctx.strokeStyle = "#f00";
@ -276,6 +279,9 @@
else ctx.lineTo(px, py); else ctx.lineTo(px, py);
} }
ctx.stroke(); ctx.stroke();
ctx.fillStyle = "#888";
const axisY = pad + plotH;
for (const t of data) ctx.fillRect(x(t.date) - 1, axisY - 1, 2, 2);
const currentDate = dateFromDays(parseInt(slider.value)); const currentDate = dateFromDays(parseInt(slider.value));
const xPos = x(currentDate); const xPos = x(currentDate);
@ -360,6 +366,10 @@
ctx.stroke(); ctx.stroke();
} }
ctx.fillStyle = "#888";
const axisY = pad + plotH;
for (const t of [...s2data, ...fusiondata]) ctx.fillRect(x(t.date) - 1, axisY - 1, 2, 2);
const currentDate = dateFromDays(parseInt(slider.value)); const currentDate = dateFromDays(parseInt(slider.value));
const xPos = x(currentDate); const xPos = x(currentDate);
ctx.strokeStyle = "#f00"; ctx.strokeStyle = "#f00";
@ -430,6 +440,9 @@
else ctx.lineTo(px, py); else ctx.lineTo(px, py);
} }
ctx.stroke(); ctx.stroke();
ctx.fillStyle = "#888";
const axisY = pad + plotH;
for (const t of data) ctx.fillRect(x(t.date) - 1, axisY - 1, 2, 2);
const xPos = x(currentDate); const xPos = x(currentDate);
ctx.strokeStyle = "#f00"; ctx.strokeStyle = "#f00";