yxcxyc
All checks were successful
Deploy / deploy-staging (push) Successful in 5s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-04 22:41:58 +02:00
parent 3795fc1de5
commit fd092ef615

View File

@@ -438,6 +438,11 @@
}
function SimpleChart(props) {
function pointTooltip(seriesLabel, point) {
const label = seriesLabel ? `${seriesLabel} · ` : '';
return `${label}${String(point.x)}: ${fmtNumber(point.y, 6)}`;
}
const series = Array.isArray(props.series)
? props.series
.map((item, index) => ({
@@ -529,7 +534,9 @@
height: height - padding - coord[1],
rx: 8,
fill: 'rgba(59, 130, 246, 0.75)',
});
}, [
h('title', { key: 'title' }, pointTooltip(seriesCoords[0].label, seriesCoords[0].data[index])),
]);
}))
: h('g', { key: 'series' }, seriesCoords.flatMap((item, index) => {
const nodes = [];
@@ -557,7 +564,9 @@
fill: '#f8fafc',
stroke: item.color,
strokeWidth: 2,
}))));
}, [
h('title', { key: 'title' }, pointTooltip(item.label, item.data[pointIndex])),
]))));
return nodes;
})),
]),