mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Heatmap: Handle unsorted timestamps in calculate mode (#68111)
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
|||||||
durationToMilliseconds,
|
durationToMilliseconds,
|
||||||
parseDuration,
|
parseDuration,
|
||||||
} from '@grafana/data';
|
} from '@grafana/data';
|
||||||
|
import { isLikelyAscendingVector } from '@grafana/data/src/transformations/transformers/joinDataFrames';
|
||||||
import {
|
import {
|
||||||
ScaleDistribution,
|
ScaleDistribution,
|
||||||
HeatmapCellLayout,
|
HeatmapCellLayout,
|
||||||
@@ -325,7 +326,7 @@ export function calculateHeatmapFromData(frames: DataFrame[], options: HeatmapCa
|
|||||||
};
|
};
|
||||||
|
|
||||||
const heat2d = heatmap(xs, ys, {
|
const heat2d = heatmap(xs, ys, {
|
||||||
xSorted: true,
|
xSorted: isLikelyAscendingVector(xs),
|
||||||
xTime: xField.type === FieldType.time,
|
xTime: xField.type === FieldType.time,
|
||||||
xMode: xBucketsCfg.mode,
|
xMode: xBucketsCfg.mode,
|
||||||
xSize:
|
xSize:
|
||||||
|
|||||||
Reference in New Issue
Block a user