From 7a22e433f48fff23436660629b6177f6aff4837c Mon Sep 17 00:00:00 2001 From: alberto Date: Thu, 3 Dec 2026 17:41:48 -0600 Subject: [PATCH] History axes keep the period order whatever trace comes first --- src/app/indicadores/figures.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/indicadores/figures.ts b/src/app/indicadores/figures.ts index 825cc7a..7877a39 100644 --- a/src/app/indicadores/figures.ts +++ b/src/app/indicadores/figures.ts @@ -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') {