History axes keep the period order whatever trace comes first

This commit is contained in:
2026-12-03 17:41:48 -06:00
parent 2da269a6a8
commit 7a22e433f4
+6 -1
View File
@@ -492,7 +492,12 @@ export function historyFigure(
): Figure {
const x = series.map((s) => s.label);
const layout = (y: string, values: (number | null)[]) => ({
xaxis: { title: { text: xTitle }, type: 'category' as const },
xaxis: {
title: { text: xTitle },
type: 'category' as const,
categoryorder: 'array' as const,
categoryarray: x,
},
yaxis: { title: { text: y }, ...valueAxis(values) },
});
if (panel.kind === 'stack') {