[v10.0.x] Heatmap: Handle unsorted timestamps in calculate mode (#68151)

Heatmap: Handle unsorted timestamps in calculate mode (#68111)

(cherry picked from commit f100a4c680)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2023-05-09 23:17:11 -05:00
committed by GitHub
co-authored by Leon Sorokin
parent 8242dec55f
commit e49234613d
@@ -15,6 +15,7 @@ import {
durationToMilliseconds,
parseDuration,
} from '@grafana/data';
import { isLikelyAscendingVector } from '@grafana/data/src/transformations/transformers/joinDataFrames';
import {
ScaleDistribution,
HeatmapCellLayout,
@@ -325,7 +326,7 @@ export function calculateHeatmapFromData(frames: DataFrame[], options: HeatmapCa
};
const heat2d = heatmap(xs, ys, {
xSorted: true,
xSorted: isLikelyAscendingVector(xs),
xTime: xField.type === FieldType.time,
xMode: xBucketsCfg.mode,
xSize: