History axes keep the period order whatever trace comes first
This commit is contained in:
@@ -492,7 +492,12 @@ export function historyFigure(
|
|||||||
): Figure {
|
): Figure {
|
||||||
const x = series.map((s) => s.label);
|
const x = series.map((s) => s.label);
|
||||||
const layout = (y: string, values: (number | null)[]) => ({
|
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) },
|
yaxis: { title: { text: y }, ...valueAxis(values) },
|
||||||
});
|
});
|
||||||
if (panel.kind === 'stack') {
|
if (panel.kind === 'stack') {
|
||||||
|
|||||||
Reference in New Issue
Block a user