Invert graph legend series show/hide behavior

Also conditionally display instructions for "Cmd" vs. "Ctrl" depending on the user agent.

See https://github.com/prometheus/prometheus/issues/16162#issuecomment-2699315258

Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
Julius Volz 2025-03-05 10:26:04 +01:00
parent 9e5d59b777
commit 8e79631f86
2 changed files with 4 additions and 1 deletions

View file

@ -95,7 +95,9 @@ const UPlotChart: FC<UPlotChartProps> = ({
className={classes.uplotChart} className={classes.uplotChart}
/> />
<Text fz="xs" c="dimmed" ml={40} mt={-25} mb="lg"> <Text fz="xs" c="dimmed" ml={40} mt={-25} mb="lg">
Click: hide single series, Ctrl+click: show single series Click: show single series,{" "}
{navigator.userAgent.includes("Mac") ? "Cmd" : "Ctrl"} + click: hide
single series
</Text> </Text>
</> </>
); );

View file

@ -313,6 +313,7 @@ export const getUPlotOptions = (
legend: { legend: {
show: true, show: true,
live: false, live: false,
isolate: true,
markers: { markers: {
fill: ( fill: (
_u: uPlot, _u: uPlot,