fix: Heatmap sorting (#31752)

This commit is contained in:
Michael S. Molina
2025-01-09 14:28:45 -03:00
committed by GitHub
parent 5acd03876b
commit a477d84729
4 changed files with 23 additions and 19 deletions

View File

@@ -156,8 +156,10 @@ export default function transformProps(
),
label: {
show: showValues,
formatter: (params: CallbackDataParams) =>
valueFormatter(params.value?.[2]),
formatter: (params: CallbackDataParams) => {
const paramsValue = params.value as (string | number)[];
return valueFormatter(paramsValue?.[2] as number | null | undefined);
},
},
},
];
@@ -178,9 +180,10 @@ export default function transformProps(
yAxisLabel,
metricLabel,
);
const x = params.value?.[0];
const y = params.value?.[1];
const value = params.value?.[2];
const paramsValue = params.value as (string | number)[];
const x = paramsValue?.[0];
const y = paramsValue?.[1];
const value = paramsValue?.[2] as number | null | undefined;
const formattedX = xAxisFormatter(x);
const formattedY = yAxisFormatter(y);
const formattedValue = valueFormatter(value);