Added colour to simulator tooltip (#3692)

* Added colour to simulator tooltip

* ./check
This commit is contained in:
Luc Mcgrady 2025-01-09 10:44:54 +00:00 committed by GitHub
parent 9499473caa
commit 59391e96fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -196,7 +196,9 @@ export function renderSimulationChart(
const hidden = path.classed("hidden");
if (!hidden) {
tooltipContent += `#${key}: ${formatY(value)}<br>`;
tooltipContent += `<span style="color:${color[(parseInt(key) - 1) % color.length]}">■</span> #${key}: ${
formatY(value)
}<br>`;
}
}