Skip to content

Commit 6587dfb

Browse files
committed
[Lens] remove warning about ordinal x-domain
1 parent 1fa774c commit 6587dfb

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

x-pack/plugins/lens/public/xy_visualization/expression.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,15 @@ export function XYChart({
388388
const isTimeViz = data.dateRange && filteredLayers.every((l) => l.xScaleType === 'time');
389389
const isHistogramViz = filteredLayers.every((l) => l.isHistogram);
390390

391-
const xDomain = {
392-
min: isTimeViz ? data.dateRange?.fromDate.getTime() : undefined,
393-
max: isTimeViz ? data.dateRange?.toDate.getTime() : undefined,
394-
minInterval,
395-
};
391+
const xDomain = isTimeViz
392+
? {
393+
min: data.dateRange?.fromDate.getTime(),
394+
max: data.dateRange?.toDate.getTime(),
395+
minInterval,
396+
}
397+
: isHistogramViz
398+
? { minInterval }
399+
: undefined;
396400

397401
const getYAxesTitles = (
398402
axisSeries: Array<{ layer: string; accessor: string }>,

0 commit comments

Comments
 (0)