[v9.5.x] Heatmap: Handle unsorted timestamps in calculate mode (#68150)
* Heatmap: Handle unsorted timestamps in calculate mode (#68111)
(cherry picked from commit f100a4c680)
* use ArrayVector
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
co-authored by
Leon Sorokin
parent
a07a0ef3b5
commit
7ca4b317c5
@@ -16,6 +16,7 @@ import {
|
||||
durationToMilliseconds,
|
||||
parseDuration,
|
||||
} from '@grafana/data';
|
||||
import { isLikelyAscendingVector } from '@grafana/data/src/transformations/transformers/joinDataFrames';
|
||||
import {
|
||||
ScaleDistribution,
|
||||
HeatmapCellLayout,
|
||||
@@ -326,7 +327,7 @@ export function calculateHeatmapFromData(frames: DataFrame[], options: HeatmapCa
|
||||
};
|
||||
|
||||
const heat2d = heatmap(xs, ys, {
|
||||
xSorted: true,
|
||||
xSorted: isLikelyAscendingVector(new ArrayVector(xs)),
|
||||
xTime: xField.type === FieldType.time,
|
||||
xMode: xBucketsCfg.mode,
|
||||
xSize:
|
||||
|
||||
Reference in New Issue
Block a user