From d0c3c245dd2af29993e262a84bd4664e99ad3119 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Tue, 10 May 2022 20:58:55 +0200 Subject: [PATCH 01/13] fix(deps): update dependency d3-scale to v2.2.2 --- packages/charts/package.json | 2 +- yarn.lock | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/charts/package.json b/packages/charts/package.json index 05a1c133d3..43a8ec154c 100644 --- a/packages/charts/package.json +++ b/packages/charts/package.json @@ -40,7 +40,7 @@ "d3-cloud": "^1.2.5", "d3-collection": "^1.0.7", "d3-interpolate": "^1.4.0", - "d3-scale": "^1.0.7", + "d3-scale": "^2.2.2", "d3-shape": "^2.0.0", "prop-types": "^15.7.2", "re-reselect": "^3.4.0", diff --git a/yarn.lock b/yarn.lock index 51d68e9c51..5d3bfb5c90 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9559,6 +9559,18 @@ d3-scale@^1.0.7: d3-time "1" d3-time-format "2" +d3-scale@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-2.2.2.tgz#4e880e0b2745acaaddd3ede26a9e908a9e17b81f" + integrity sha512-LbeEvGgIb8UMcAa0EATLNX0lelKWGYDQiPdHj+gLblGVhGLyNbaCn3EvrJf0A3Y/uOOU5aD6MTh5ZFCdEwGiCw== + dependencies: + d3-array "^1.2.0" + d3-collection "1" + d3-format "1" + d3-interpolate "1" + d3-time "1" + d3-time-format "2" + d3-shape@^1.3.4: version "1.3.7" resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7" From 7a5ee49c62231ccb97dd961e6e629a1f4d1f8185 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Wed, 11 May 2022 10:44:41 +0200 Subject: [PATCH 02/13] Update types --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5d3bfb5c90..fd60454cf5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5737,11 +5737,11 @@ integrity sha512-6K8LaFlztlhZO7mwsZg7ClRsdLg3FJRzIIi6SZXDWmmSJc2x8dd2VkESbLXdk3p8cuvz71f36S0y8Zv2AxqvQw== "@types/d3-scale@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-2.1.1.tgz#405e58771ec6ae7b8f7b4178ee1887620759e8f7" - integrity sha512-kNTkbZQ+N/Ip8oX9PByXfDLoCSaZYm+VUOasbmsa6KD850/ziMdYepg/8kLg2plHzoLANdMqPoYQbvExevLUHg== + version "2.2.6" + resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-2.2.6.tgz#28540b4dfc99d978970e873e4138a6bea2ea6ab8" + integrity sha512-CHu34T5bGrJOeuhGxyiz9Xvaa9PlsIaQoOqjDg7zqeGj2x0rwPhGquiy03unigvcMxmvY0hEaAouT0LOFTLpIw== dependencies: - "@types/d3-time" "*" + "@types/d3-time" "^1" "@types/d3-shape@^2.0.0": version "2.1.3" @@ -5750,10 +5750,10 @@ dependencies: "@types/d3-path" "^2" -"@types/d3-time@*": - version "1.0.10" - resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-1.0.10.tgz#d338c7feac93a98a32aac875d1100f92c7b61f4f" - integrity sha512-aKf62rRQafDQmSiv1NylKhIMmznsjRN+MnXRXTqHoqm0U/UZzVpdrtRnSIfdiLS616OuC1soYeX1dBg2n1u8Xw== +"@types/d3-time@^1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-1.1.1.tgz#6cf3a4242c3bbac00440dfb8ba7884f16bedfcbf" + integrity sha512-ULX7LoqXTCYtM+tLYOaeAJK7IwCT+4Gxlm2MaH0ErKLi07R5lh8NHCAyWcDkCCmx1AfRcBEV6H9QE9R25uP7jw== "@types/d3@^3": version "3.5.45" From 29804a63249fcb19d26f8b13e3f7fce176ddc922 Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Thu, 12 May 2022 12:33:49 +0200 Subject: [PATCH 03/13] deps(d3): fix updated type issues BREAKING CHANGE: the new d3-scale version used ES2015 and our target version needs to align to that. --- package.json | 2 +- packages/charts/package.json | 2 +- .../heatmap/layout/viewmodel/viewmodel.ts | 17 +++- .../selectors/get_elements_at_cursor_pos.ts | 5 +- .../selectors/get_projected_scaled_values.ts | 5 +- .../state/selectors/on_brush_end_caller.ts | 8 +- .../state/selectors/on_pointer_move_caller.ts | 5 +- packages/charts/src/scales/index.ts | 6 +- packages/charts/src/scales/scale_band.ts | 6 +- .../charts/src/scales/scale_continuous.ts | 19 +++- packages/charts/src/scales/types.ts | 2 +- packages/charts/src/utils/common.ts | 13 --- yarn.lock | 92 +++++++++++++------ 13 files changed, 114 insertions(+), 68 deletions(-) diff --git a/package.json b/package.json index 06de32733e..a70dd756af 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "@types/d3-cloud": "^1.2.5", "@types/d3-collection": "^1.0.8", "@types/d3-interpolate": "^1.3.1", - "@types/d3-scale": "^2.1.1", + "@types/d3-scale": "^4.0.2", "@types/d3-shape": "^2.0.0", "@types/enzyme": "^3.9.0", "@types/enzyme-adapter-react-16": "^1.0.5", diff --git a/packages/charts/package.json b/packages/charts/package.json index 43a8ec154c..9f0ddae2f9 100644 --- a/packages/charts/package.json +++ b/packages/charts/package.json @@ -40,7 +40,7 @@ "d3-cloud": "^1.2.5", "d3-collection": "^1.0.7", "d3-interpolate": "^1.4.0", - "d3-scale": "^2.2.2", + "d3-scale": "^4.0.2", "d3-shape": "^2.0.0", "prop-types": "^15.7.2", "re-reselect": "^3.4.0", diff --git a/packages/charts/src/chart_types/heatmap/layout/viewmodel/viewmodel.ts b/packages/charts/src/chart_types/heatmap/layout/viewmodel/viewmodel.ts index cda42c6d48..5d14039553 100644 --- a/packages/charts/src/chart_types/heatmap/layout/viewmodel/viewmodel.ts +++ b/packages/charts/src/chart_types/heatmap/layout/viewmodel/viewmodel.ts @@ -17,7 +17,7 @@ import { ScaleType } from '../../../../scales/constants'; import { LinearScale, OrdinalScale, RasterTimeScale } from '../../../../specs'; import { TextMeasure } from '../../../../utils/bbox/canvas_text_bbox_calculator'; import { addIntervalToTime } from '../../../../utils/chrono/elasticsearch'; -import { clamp, Datum } from '../../../../utils/common'; +import { clamp, Datum, isDefined } from '../../../../utils/common'; import { innerPad, pad } from '../../../../utils/dimensions'; import { Logger } from '../../../../utils/logger'; import { HeatmapStyle, Theme, Visible } from '../../../../utils/themes/theme'; @@ -89,7 +89,7 @@ export function shapeViewModel( .domain([0, elementSizes.grid.width]) .range(xValues); - // compute the cell width (can be smaller then the available size depending on config + // compute the cell width (can be smaller than the available size depending on config const cellWidth = heatmapTheme.cell.maxWidth !== 'fill' && xScale.bandwidth() > heatmapTheme.cell.maxWidth ? heatmapTheme.cell.maxWidth @@ -129,8 +129,8 @@ export function shapeViewModel( // compute each available cell position, color and value const cellMap = table.reduce>((acc, d) => { - const x = xScale(String(d.x)); - const y = yScale(String(d.y))! + gridStrokeWidth; + const x = xScale(d.x); + const y = yScale(d.y); const yIndex = yValues.indexOf(d.y); if (x === undefined || y === undefined || yIndex === -1) { @@ -156,7 +156,7 @@ export function shapeViewModel( x: (heatmapTheme.cell.maxWidth !== 'fill' ? x + xScale.bandwidth() / 2 - heatmapTheme.cell.maxWidth / 2 : x) + gridStrokeWidth, - y, + y: y + gridStrokeWidth, yIndex, width: cellWidthInner, height: cellHeightInner, @@ -230,6 +230,13 @@ export function shapeViewModel( const endX = xInvertedScale(clamp(bottomRight[0], 0, width)); const startY = yInvertedScale(clamp(topLeft[1], 0, currentGridHeight - 1)); const endY = yInvertedScale(clamp(bottomRight[1], 0, currentGridHeight - 1)); + if (!isDefined(startX) || !isDefined(endX) || !isDefined(startY) || !isDefined(endY)) { + return { + cells: [], + x: [], + y: [], + }; + } const allXValuesInRange: Array> = getValuesInRange(xValues, startX, endX); const allYValuesInRange: Array> = getValuesInRange(yValues, startY, endY); diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/get_elements_at_cursor_pos.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/get_elements_at_cursor_pos.ts index f348de641b..ac3e4ff954 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/get_elements_at_cursor_pos.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/get_elements_at_cursor_pos.ts @@ -9,6 +9,7 @@ import { PointerEvent } from '../../../../specs'; import { GlobalChartState } from '../../../../state/chart_state'; import { createCustomCachedSelector } from '../../../../state/create_selector'; +import { isDefined } from '../../../../utils/common'; import { isValidPointerOverEvent } from '../../../../utils/events'; import { IndexedGeometry } from '../../../../utils/geometry'; import { ChartDimensions } from '../../utils/dimensions'; @@ -55,13 +56,13 @@ function getElementAtCursorPosition( return geometriesIndex.find(externalPointerEvent.x, { x: -1, y: -1 }); } const xValue = scales.xScale.invertWithStep(orientedProjectedPointerPosition.x, geometriesIndexKeys); - if (!xValue) { + if (!isDefined(xValue.value)) { return []; } // get the elements at cursor position return geometriesIndex .find( - xValue?.value, + xValue.value, orientedProjectedPointerPosition, orientedProjectedPointerPosition.horizontalPanelValue, orientedProjectedPointerPosition.verticalPanelValue, diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/get_projected_scaled_values.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/get_projected_scaled_values.ts index 1ab5296119..bbb21792db 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/get_projected_scaled_values.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/get_projected_scaled_values.ts @@ -8,6 +8,7 @@ import { ProjectedValues } from '../../../../specs/settings'; import { createCustomCachedSelector } from '../../../../state/create_selector'; +import { isDefined } from '../../../../utils/common'; import { computeSeriesGeometriesSelector } from './compute_series_geometries'; import { getGeometriesIndexKeysSelector } from './get_geometries_index_keys'; import { getOrientedProjectedPointerPositionSelector } from './get_oriented_projected_pointer_position'; @@ -25,13 +26,13 @@ export const getProjectedScaledValues = createCustomCachedSelector( } const xValue = xScale.invertWithStep(x, geometriesIndexKeys); - if (!xValue) { + if (!isDefined(xValue.value)) { return; } return { x: xValue.value, - y: [...yScales.entries()].map(([groupId, yScale]) => ({ value: yScale.invert(y), groupId })), + y: [...yScales.entries()].map(([groupId, yScale]) => ({ value: yScale.invert(y) ?? NaN, groupId })), smVerticalValue: verticalPanelValue, smHorizontalValue: horizontalPanelValue, }; diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/on_brush_end_caller.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/on_brush_end_caller.ts index dcd76bab02..26e906e1fb 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/on_brush_end_caller.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/on_brush_end_caller.ts @@ -156,8 +156,8 @@ function getXBrushExtent( const histogramEnabled = isHistogramEnabled(seriesSpecs); const invertValue = histogramEnabled && roundHistogramBrushValues - ? (value: number) => xScale.invertWithStep(value, xScale.domain).value - : (value: number) => xScale.invert(value); + ? (value: number) => xScale.invertWithStep(value, xScale.domain).value ?? NaN + : (value: number) => xScale.invert(value) ?? NaN; const minPosScaled = invertValue(minPos + offset); const maxPosScaled = invertValue(maxPos + offset); const maxDomainValue = @@ -210,8 +210,8 @@ function getYBrushExtents( return; } - const minPosScaled = yScale.invert(minPos); - const maxPosScaled = yScale.invert(maxPos); + const minPosScaled = yScale.invert(minPos) ?? NaN; + const maxPosScaled = yScale.invert(maxPos) ?? NaN; const minValue = clamp(minPosScaled, yScale.domain[0], maxPosScaled); const maxValue = clamp(minPosScaled, maxPosScaled, yScale.domain[1]); yValues.push({ extent: [minValue, maxValue], groupId }); diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/on_pointer_move_caller.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/on_pointer_move_caller.ts index a08f577ce5..cbfc26cd3c 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/on_pointer_move_caller.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/on_pointer_move_caller.ts @@ -15,6 +15,7 @@ import { GlobalChartState } from '../../../../state/chart_state'; import { createCustomCachedSelector } from '../../../../state/create_selector'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; +import { isDefined } from '../../../../utils/common'; import { ComputedScales } from '../utils/types'; import { computeSeriesGeometriesSelector } from './compute_series_geometries'; import { getGeometriesIndexKeysSelector } from './get_geometries_index_keys'; @@ -47,7 +48,7 @@ function getPointerEvent( return { chartId, type: PointerEventType.Out }; } const xValue = xScale.invertWithStep(x, geometriesIndexKeys); - if (!xValue) { + if (!isDefined(xValue.value)) { return { chartId, type: PointerEventType.Out }; } return { @@ -57,7 +58,7 @@ function getPointerEvent( scale: xScale.type, x: xValue.value, y: [...yScales.entries()].map(([groupId, yScale]) => { - return { value: yScale.invert(y), groupId }; + return { value: yScale.invert(y) ?? NaN, groupId }; }), smVerticalValue: verticalPanelValue, smHorizontalValue: horizontalPanelValue, diff --git a/packages/charts/src/scales/index.ts b/packages/charts/src/scales/index.ts index 2f9c0e8322..3a559c2f20 100644 --- a/packages/charts/src/scales/index.ts +++ b/packages/charts/src/scales/index.ts @@ -26,7 +26,7 @@ export type ScaleBandType = ScaleOrdinalType; /** * A `Scale` interface. A scale can map an input value within a specified domain * to an output value from a specified range. - * The the value is mapped depending on the `type` (linear, log, sqrt, time, ordinal) + * The value is mapped depending on the `type` (linear, log, sqrt, time, ordinal) * @internal */ export interface Scale { @@ -39,12 +39,12 @@ export interface Scale { ticks: () => T[]; scale: (value?: PrimitiveValue) => number; pureScale: (value?: PrimitiveValue) => number; - invert: (value: number) => T; + invert: (value: number) => T | undefined; invertWithStep: ( value: number, data: any[], ) => { - value: T; + value: T | undefined; withinBandwidth: boolean; }; isSingleValue: () => boolean; diff --git a/packages/charts/src/scales/scale_band.ts b/packages/charts/src/scales/scale_band.ts index 8293abdf51..9cb809736e 100644 --- a/packages/charts/src/scales/scale_band.ts +++ b/packages/charts/src/scales/scale_band.ts @@ -12,7 +12,7 @@ import { Scale, ScaleBandType } from '.'; import { PrimitiveValue } from '../chart_types/partition_chart/layout/utils/group_by_rollup'; import { Ratio } from '../common/geometry'; import { RelativeBandsPadding } from '../specs'; -import { clamp, stringifyNullsUndefined } from '../utils/common'; +import { clamp } from '../utils/common'; import { Range } from '../utils/domain'; import { ScaleType } from './constants'; @@ -20,7 +20,7 @@ import { ScaleType } from './constants'; * Categorical scale * @internal */ -export class ScaleBand implements Scale { +export class ScaleBand implements Scale { readonly bandwidth: number; readonly bandwidthPadding: number; @@ -85,7 +85,7 @@ export class ScaleBand implements Scale { } scale(value?: PrimitiveValue) { - const scaleValue = this.d3Scale(stringifyNullsUndefined(value)); + const scaleValue = this.d3Scale((value as unknown) as T); return typeof scaleValue === 'number' && Number.isFinite(scaleValue) ? scaleValue : NaN; // fixme when TS improves } diff --git a/packages/charts/src/scales/scale_continuous.ts b/packages/charts/src/scales/scale_continuous.ts index 9847c90fb4..231f52b9b1 100644 --- a/packages/charts/src/scales/scale_continuous.ts +++ b/packages/charts/src/scales/scale_continuous.ts @@ -15,6 +15,7 @@ import { ScaleLogarithmic, ScalePower, scaleSqrt, + ScaleTime, scaleUtc, } from 'd3-scale'; import { Required } from 'utility-types'; @@ -29,7 +30,15 @@ import { ContinuousDomain, Range } from '../utils/domain'; import { LOG_MIN_ABS_DOMAIN, ScaleType } from './constants'; import { LogScaleOptions } from './types'; -const SCALES = { +type ContinuousScaleType = + | typeof ScaleType.Time + | typeof ScaleType.Linear + | typeof ScaleType.Log + | typeof ScaleType.Sqrt; +const SCALES: Record< + ContinuousScaleType, + () => ScaleContinuousNumeric | ScaleTime +> = { [ScaleType.Linear]: scaleLinear, [ScaleType.Log]: scaleLog, [ScaleType.Sqrt]: scaleSqrt, @@ -70,7 +79,7 @@ export class ScaleContinuous implements Scale { readonly timeZone: string; readonly barsPadding: number; readonly isSingleValueHistogram: boolean; - private readonly project: (d: number) => number; + private readonly project: (d: number) => number | undefined; private readonly inverseProject: (d: number) => number | Date; constructor( @@ -171,12 +180,14 @@ export class ScaleContinuous implements Scale { scale(value?: PrimitiveValue) { return typeof value === 'number' - ? this.project(value) + (this.bandwidthPadding / 2) * this.totalBarsInCluster + ? (this.project(value) ?? NaN) + (this.bandwidthPadding / 2) * this.totalBarsInCluster : NaN; } pureScale(value?: PrimitiveValue) { - return typeof value === 'number' ? this.project(this.bandwidth === 0 ? value : value + this.minInterval / 2) : NaN; + return typeof value === 'number' + ? this.project(this.bandwidth === 0 ? value : value + this.minInterval / 2) ?? NaN + : NaN; } ticks() { diff --git a/packages/charts/src/scales/types.ts b/packages/charts/src/scales/types.ts index d9415b3c9b..38ef655963 100644 --- a/packages/charts/src/scales/types.ts +++ b/packages/charts/src/scales/types.ts @@ -12,7 +12,7 @@ import { ScaleBand } from './scale_band'; import { ScaleContinuous } from './scale_continuous'; /** - * Check if a scale is logaritmic + * Check if a scale is logarithmic * @internal */ export function isLogarithmicScale(scale: Scale): scale is ScaleContinuous { diff --git a/packages/charts/src/utils/common.ts b/packages/charts/src/utils/common.ts index 7e2b8d4c71..edb7f0436f 100644 --- a/packages/charts/src/utils/common.ts +++ b/packages/charts/src/utils/common.ts @@ -446,19 +446,6 @@ export function getDistance(a: Point, b: Point): number { return Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y, 2)); } -/** @internal */ -export function stringifyNullsUndefined(value?: PrimitiveValue): string | number { - if (value === undefined) { - return 'undefined'; - } - - if (value === null) { - return 'null'; - } - - return value; -} - /** * Determines if an array has all unique values * diff --git a/yarn.lock b/yarn.lock index fd60454cf5..03c9d8fb93 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5736,12 +5736,12 @@ resolved "https://registry.yarnpkg.com/@types/d3-path/-/d3-path-2.0.1.tgz#ca03dfa8b94d8add97ad0cd97e96e2006b4763cb" integrity sha512-6K8LaFlztlhZO7mwsZg7ClRsdLg3FJRzIIi6SZXDWmmSJc2x8dd2VkESbLXdk3p8cuvz71f36S0y8Zv2AxqvQw== -"@types/d3-scale@^2.1.1": - version "2.2.6" - resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-2.2.6.tgz#28540b4dfc99d978970e873e4138a6bea2ea6ab8" - integrity sha512-CHu34T5bGrJOeuhGxyiz9Xvaa9PlsIaQoOqjDg7zqeGj2x0rwPhGquiy03unigvcMxmvY0hEaAouT0LOFTLpIw== +"@types/d3-scale@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-4.0.2.tgz#41be241126af4630524ead9cb1008ab2f0f26e69" + integrity sha512-Yk4htunhPAwN0XGlIwArRomOjdoBFXC3+kCxK2Ubg7I9shQlVSJy/pG/Ht5ASN+gdMIalpk8TJ5xV74jFsetLA== dependencies: - "@types/d3-time" "^1" + "@types/d3-time" "*" "@types/d3-shape@^2.0.0": version "2.1.3" @@ -5750,10 +5750,10 @@ dependencies: "@types/d3-path" "^2" -"@types/d3-time@^1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-1.1.1.tgz#6cf3a4242c3bbac00440dfb8ba7884f16bedfcbf" - integrity sha512-ULX7LoqXTCYtM+tLYOaeAJK7IwCT+4Gxlm2MaH0ErKLi07R5lh8NHCAyWcDkCCmx1AfRcBEV6H9QE9R25uP7jw== +"@types/d3-time@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-3.0.0.tgz#e1ac0f3e9e195135361fa1a1d62f795d87e6e819" + integrity sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg== "@types/d3@^3": version "3.5.45" @@ -9485,6 +9485,13 @@ cz-conventional-changelog@3.3.0, cz-conventional-changelog@^3.3.0: optionalDependencies: "@commitlint/load" ">6.1.1" +"d3-array@2 - 3", "d3-array@2.10.0 - 3": + version "3.1.6" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.1.6.tgz#0342c835925826f49b4d16eb7027aec334ffc97d" + integrity sha512-DCbBBNuKOeiR9h04ySRBMW52TFVc91O9wJziuyXw6Ztmy8D3oZbmCkOO3UHKC7ceNJsN2Mavo9+vwV8EAEUXzA== + dependencies: + internmap "1 - 2" + d3-array@^1.2.0, d3-array@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-1.2.4.tgz#635ce4d5eea759f6f605863dbcfc30edc737f71f" @@ -9507,6 +9514,11 @@ d3-color@1: resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.4.0.tgz#89c45a995ed773b13314f06460df26d60ba0ecaf" integrity sha512-TzNPeJy2+iEepfiL92LAAB7fvnp/dV2YwANPVHdDWmYMm23qIJBYww3qT8I8C1wXrmrg4UWs7BKc2tKIgyjzHg== +"d3-color@1 - 3": + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2" + integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA== + d3-color@^1.4.0: version "1.4.1" resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.4.1.tgz#c52002bf8846ada4424d55d97982fef26eb3bc8a" @@ -9522,6 +9534,11 @@ d3-format@1: resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.4.1.tgz#c45f74b17c5a290c072a4ba7039dd19662cd5ce6" integrity sha512-TUswGe6hfguUX1CtKxyG2nymO+1lyThbkS1ifLX0Sr+dOQtAD5gkrffpHnx+yHNKUZ0Bmg5T4AjUQwugPDrm0g== +"d3-format@1 - 3": + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.1.0.tgz#9260e23a28ea5cb109e93b21a06e24e2ebd55641" + integrity sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA== + d3-interpolate@1: version "1.3.2" resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-1.3.2.tgz#417d3ebdeb4bc4efcc8fd4361c55e4040211fd68" @@ -9529,6 +9546,13 @@ d3-interpolate@1: dependencies: d3-color "1" +"d3-interpolate@1.2.0 - 3": + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d" + integrity sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g== + dependencies: + d3-color "1 - 3" + d3-interpolate@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-1.4.0.tgz#526e79e2d80daa383f9e0c1c1c7dcc0f0583e987" @@ -9559,17 +9583,16 @@ d3-scale@^1.0.7: d3-time "1" d3-time-format "2" -d3-scale@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-2.2.2.tgz#4e880e0b2745acaaddd3ede26a9e908a9e17b81f" - integrity sha512-LbeEvGgIb8UMcAa0EATLNX0lelKWGYDQiPdHj+gLblGVhGLyNbaCn3EvrJf0A3Y/uOOU5aD6MTh5ZFCdEwGiCw== +d3-scale@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-4.0.2.tgz#82b38e8e8ff7080764f8dcec77bd4be393689396" + integrity sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ== dependencies: - d3-array "^1.2.0" - d3-collection "1" - d3-format "1" - d3-interpolate "1" - d3-time "1" - d3-time-format "2" + d3-array "2.10.0 - 3" + d3-format "1 - 3" + d3-interpolate "1.2.0 - 3" + d3-time "2.1.1 - 3" + d3-time-format "2 - 4" d3-shape@^1.3.4: version "1.3.7" @@ -9592,11 +9615,25 @@ d3-time-format@2: dependencies: d3-time "1" +"d3-time-format@2 - 4": + version "4.1.0" + resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-4.1.0.tgz#7ab5257a5041d11ecb4fe70a5c7d16a195bb408a" + integrity sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg== + dependencies: + d3-time "1 - 3" + d3-time@1: version "1.1.0" resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.1.0.tgz#b1e19d307dae9c900b7e5b25ffc5dcc249a8a0f1" integrity sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA== +"d3-time@1 - 3", "d3-time@2.1.1 - 3": + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.0.0.tgz#65972cb98ae2d4954ef5c932e8704061335d4975" + integrity sha512-zmV3lRnlaLI08y9IMRXSDshQb5Nj77smnfpnd2LrBa/2K281Jijactokeak14QacHs/kKq0AQ121nidNYlarbQ== + dependencies: + d3-array "2 - 3" + d@1, d@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" @@ -10780,7 +10817,8 @@ eslint-module-utils@^2.6.0: pkg-dir "^2.0.0" "eslint-plugin-elastic-charts@link:./packages/eslint-plugin-elastic-charts": - version "1.0.0" + version "0.0.0" + uid "" eslint-plugin-eslint-comments@^3.2.0: version "3.2.0" @@ -13341,6 +13379,11 @@ internal-slot@^1.0.2: has "^1.0.3" side-channel "^1.0.2" +"internmap@1 - 2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" + integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== + interpret@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -15266,13 +15309,8 @@ lines-and-columns@^1.1.6: integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= "link-kibana@link:./packages/link_kibana": - version "1.0.0" - dependencies: - chalk "^4.1.1" - change-case "^4.1.2" - glob "^7.1.7" - inquirer "^8.0.0" - ora "^5.4.0" + version "0.0.0" + uid "" lint-staged@^10.5.3: version "10.5.3" From 569f36c2b71e3f10de3b1a86aa07a62af39510e8 Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Mon, 16 May 2022 18:20:33 +0200 Subject: [PATCH 04/13] Fix scale types --- .../state/selectors/get_elements_at_cursor_pos.ts | 3 +-- .../state/selectors/get_projected_scaled_values.ts | 5 ++--- .../xy_chart/state/selectors/on_brush_end_caller.ts | 8 ++++---- .../xy_chart/state/selectors/on_pointer_move_caller.ts | 5 ++--- packages/charts/src/scales/index.ts | 4 ++-- packages/charts/src/scales/scale_band.ts | 2 +- 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/get_elements_at_cursor_pos.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/get_elements_at_cursor_pos.ts index ac3e4ff954..fae8a67c11 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/get_elements_at_cursor_pos.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/get_elements_at_cursor_pos.ts @@ -9,7 +9,6 @@ import { PointerEvent } from '../../../../specs'; import { GlobalChartState } from '../../../../state/chart_state'; import { createCustomCachedSelector } from '../../../../state/create_selector'; -import { isDefined } from '../../../../utils/common'; import { isValidPointerOverEvent } from '../../../../utils/events'; import { IndexedGeometry } from '../../../../utils/geometry'; import { ChartDimensions } from '../../utils/dimensions'; @@ -56,7 +55,7 @@ function getElementAtCursorPosition( return geometriesIndex.find(externalPointerEvent.x, { x: -1, y: -1 }); } const xValue = scales.xScale.invertWithStep(orientedProjectedPointerPosition.x, geometriesIndexKeys); - if (!isDefined(xValue.value)) { + if (!Number.isFinite(xValue.value)) { return []; } // get the elements at cursor position diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/get_projected_scaled_values.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/get_projected_scaled_values.ts index bbb21792db..b0bc3ef04f 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/get_projected_scaled_values.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/get_projected_scaled_values.ts @@ -8,7 +8,6 @@ import { ProjectedValues } from '../../../../specs/settings'; import { createCustomCachedSelector } from '../../../../state/create_selector'; -import { isDefined } from '../../../../utils/common'; import { computeSeriesGeometriesSelector } from './compute_series_geometries'; import { getGeometriesIndexKeysSelector } from './get_geometries_index_keys'; import { getOrientedProjectedPointerPositionSelector } from './get_oriented_projected_pointer_position'; @@ -26,13 +25,13 @@ export const getProjectedScaledValues = createCustomCachedSelector( } const xValue = xScale.invertWithStep(x, geometriesIndexKeys); - if (!isDefined(xValue.value)) { + if (!Number.isFinite(xValue.value)) { return; } return { x: xValue.value, - y: [...yScales.entries()].map(([groupId, yScale]) => ({ value: yScale.invert(y) ?? NaN, groupId })), + y: [...yScales.entries()].map(([groupId, yScale]) => ({ value: yScale.invert(y), groupId })), smVerticalValue: verticalPanelValue, smHorizontalValue: horizontalPanelValue, }; diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/on_brush_end_caller.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/on_brush_end_caller.ts index 26e906e1fb..dcd76bab02 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/on_brush_end_caller.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/on_brush_end_caller.ts @@ -156,8 +156,8 @@ function getXBrushExtent( const histogramEnabled = isHistogramEnabled(seriesSpecs); const invertValue = histogramEnabled && roundHistogramBrushValues - ? (value: number) => xScale.invertWithStep(value, xScale.domain).value ?? NaN - : (value: number) => xScale.invert(value) ?? NaN; + ? (value: number) => xScale.invertWithStep(value, xScale.domain).value + : (value: number) => xScale.invert(value); const minPosScaled = invertValue(minPos + offset); const maxPosScaled = invertValue(maxPos + offset); const maxDomainValue = @@ -210,8 +210,8 @@ function getYBrushExtents( return; } - const minPosScaled = yScale.invert(minPos) ?? NaN; - const maxPosScaled = yScale.invert(maxPos) ?? NaN; + const minPosScaled = yScale.invert(minPos); + const maxPosScaled = yScale.invert(maxPos); const minValue = clamp(minPosScaled, yScale.domain[0], maxPosScaled); const maxValue = clamp(minPosScaled, maxPosScaled, yScale.domain[1]); yValues.push({ extent: [minValue, maxValue], groupId }); diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/on_pointer_move_caller.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/on_pointer_move_caller.ts index cbfc26cd3c..aa987c6da8 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/on_pointer_move_caller.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/on_pointer_move_caller.ts @@ -15,7 +15,6 @@ import { GlobalChartState } from '../../../../state/chart_state'; import { createCustomCachedSelector } from '../../../../state/create_selector'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; -import { isDefined } from '../../../../utils/common'; import { ComputedScales } from '../utils/types'; import { computeSeriesGeometriesSelector } from './compute_series_geometries'; import { getGeometriesIndexKeysSelector } from './get_geometries_index_keys'; @@ -48,7 +47,7 @@ function getPointerEvent( return { chartId, type: PointerEventType.Out }; } const xValue = xScale.invertWithStep(x, geometriesIndexKeys); - if (!isDefined(xValue.value)) { + if (!Number.isFinite(xValue.value)) { return { chartId, type: PointerEventType.Out }; } return { @@ -58,7 +57,7 @@ function getPointerEvent( scale: xScale.type, x: xValue.value, y: [...yScales.entries()].map(([groupId, yScale]) => { - return { value: yScale.invert(y) ?? NaN, groupId }; + return { value: yScale.invert(y), groupId }; }), smVerticalValue: verticalPanelValue, smHorizontalValue: horizontalPanelValue, diff --git a/packages/charts/src/scales/index.ts b/packages/charts/src/scales/index.ts index 3a559c2f20..c1bad53823 100644 --- a/packages/charts/src/scales/index.ts +++ b/packages/charts/src/scales/index.ts @@ -39,12 +39,12 @@ export interface Scale { ticks: () => T[]; scale: (value?: PrimitiveValue) => number; pureScale: (value?: PrimitiveValue) => number; - invert: (value: number) => T | undefined; + invert: (value: number) => T; invertWithStep: ( value: number, data: any[], ) => { - value: T | undefined; + value: T; withinBandwidth: boolean; }; isSingleValue: () => boolean; diff --git a/packages/charts/src/scales/scale_band.ts b/packages/charts/src/scales/scale_band.ts index 9cb809736e..a37357dfeb 100644 --- a/packages/charts/src/scales/scale_band.ts +++ b/packages/charts/src/scales/scale_band.ts @@ -20,7 +20,7 @@ import { ScaleType } from './constants'; * Categorical scale * @internal */ -export class ScaleBand implements Scale { +export class ScaleBand implements Scale { readonly bandwidth: number; readonly bandwidthPadding: number; From 01083b676decb2ec27fee82eb6dcd2876c20c97c Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Mon, 16 May 2022 19:19:35 +0200 Subject: [PATCH 05/13] deps: downgraded d3-scale to 3.3.3 --- package.json | 2 +- packages/charts/package.json | 2 +- yarn.lock | 104 +++++++++++++++++------------------ 3 files changed, 54 insertions(+), 54 deletions(-) diff --git a/package.json b/package.json index a70dd756af..3c5b675303 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "@types/d3-cloud": "^1.2.5", "@types/d3-collection": "^1.0.8", "@types/d3-interpolate": "^1.3.1", - "@types/d3-scale": "^4.0.2", + "@types/d3-scale": "^3.3.0", "@types/d3-shape": "^2.0.0", "@types/enzyme": "^3.9.0", "@types/enzyme-adapter-react-16": "^1.0.5", diff --git a/packages/charts/package.json b/packages/charts/package.json index 9f0ddae2f9..215381c9f6 100644 --- a/packages/charts/package.json +++ b/packages/charts/package.json @@ -40,7 +40,7 @@ "d3-cloud": "^1.2.5", "d3-collection": "^1.0.7", "d3-interpolate": "^1.4.0", - "d3-scale": "^4.0.2", + "d3-scale": "3.3.0", "d3-shape": "^2.0.0", "prop-types": "^15.7.2", "re-reselect": "^3.4.0", diff --git a/yarn.lock b/yarn.lock index 03c9d8fb93..227f182a67 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5736,12 +5736,12 @@ resolved "https://registry.yarnpkg.com/@types/d3-path/-/d3-path-2.0.1.tgz#ca03dfa8b94d8add97ad0cd97e96e2006b4763cb" integrity sha512-6K8LaFlztlhZO7mwsZg7ClRsdLg3FJRzIIi6SZXDWmmSJc2x8dd2VkESbLXdk3p8cuvz71f36S0y8Zv2AxqvQw== -"@types/d3-scale@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-4.0.2.tgz#41be241126af4630524ead9cb1008ab2f0f26e69" - integrity sha512-Yk4htunhPAwN0XGlIwArRomOjdoBFXC3+kCxK2Ubg7I9shQlVSJy/pG/Ht5ASN+gdMIalpk8TJ5xV74jFsetLA== +"@types/d3-scale@^3.3.0": + version "3.3.2" + resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-3.3.2.tgz#18c94e90f4f1c6b1ee14a70f14bfca2bd1c61d06" + integrity sha512-gGqr7x1ost9px3FvIfUMi5XA/F/yAf4UkUDtdQhpH92XCT0Oa7zkkRzY61gPVJq+DxpHn/btouw5ohWkbBsCzQ== dependencies: - "@types/d3-time" "*" + "@types/d3-time" "^2" "@types/d3-shape@^2.0.0": version "2.1.3" @@ -5750,10 +5750,10 @@ dependencies: "@types/d3-path" "^2" -"@types/d3-time@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-3.0.0.tgz#e1ac0f3e9e195135361fa1a1d62f795d87e6e819" - integrity sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg== +"@types/d3-time@^2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-2.1.1.tgz#743fdc821c81f86537cbfece07093ac39b4bc342" + integrity sha512-9MVYlmIgmRR31C5b4FVSWtuMmBHh2mOWQYfl7XAYOa8dsnb7iEmUmRSWSFgXFtkjxO65d7hTUHQC+RhR/9IWFg== "@types/d3@^3": version "3.5.45" @@ -9485,12 +9485,12 @@ cz-conventional-changelog@3.3.0, cz-conventional-changelog@^3.3.0: optionalDependencies: "@commitlint/load" ">6.1.1" -"d3-array@2 - 3", "d3-array@2.10.0 - 3": - version "3.1.6" - resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.1.6.tgz#0342c835925826f49b4d16eb7027aec334ffc97d" - integrity sha512-DCbBBNuKOeiR9h04ySRBMW52TFVc91O9wJziuyXw6Ztmy8D3oZbmCkOO3UHKC7ceNJsN2Mavo9+vwV8EAEUXzA== +d3-array@2, d3-array@^2.3.0: + version "2.12.1" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-2.12.1.tgz#e20b41aafcdffdf5d50928004ececf815a465e81" + integrity sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ== dependencies: - internmap "1 - 2" + internmap "^1.0.0" d3-array@^1.2.0, d3-array@^1.2.4: version "1.2.4" @@ -9514,10 +9514,10 @@ d3-color@1: resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.4.0.tgz#89c45a995ed773b13314f06460df26d60ba0ecaf" integrity sha512-TzNPeJy2+iEepfiL92LAAB7fvnp/dV2YwANPVHdDWmYMm23qIJBYww3qT8I8C1wXrmrg4UWs7BKc2tKIgyjzHg== -"d3-color@1 - 3": - version "3.1.0" - resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2" - integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA== +"d3-color@1 - 2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-2.0.0.tgz#8d625cab42ed9b8f601a1760a389f7ea9189d62e" + integrity sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ== d3-color@^1.4.0: version "1.4.1" @@ -9534,10 +9534,10 @@ d3-format@1: resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.4.1.tgz#c45f74b17c5a290c072a4ba7039dd19662cd5ce6" integrity sha512-TUswGe6hfguUX1CtKxyG2nymO+1lyThbkS1ifLX0Sr+dOQtAD5gkrffpHnx+yHNKUZ0Bmg5T4AjUQwugPDrm0g== -"d3-format@1 - 3": - version "3.1.0" - resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.1.0.tgz#9260e23a28ea5cb109e93b21a06e24e2ebd55641" - integrity sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA== +"d3-format@1 - 2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-2.0.0.tgz#a10bcc0f986c372b729ba447382413aabf5b0767" + integrity sha512-Ab3S6XuE/Q+flY96HXT0jOXcM4EAClYFnRGY5zsjRGNy6qCYrQsMffs7cV5Q9xejb35zxW5hf/guKw34kvIKsA== d3-interpolate@1: version "1.3.2" @@ -9546,12 +9546,12 @@ d3-interpolate@1: dependencies: d3-color "1" -"d3-interpolate@1.2.0 - 3": - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d" - integrity sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g== +"d3-interpolate@1.2.0 - 2": + version "2.0.1" + resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-2.0.1.tgz#98be499cfb8a3b94d4ff616900501a64abc91163" + integrity sha512-c5UhwwTs/yybcmTpAVqwSFl6vrQ8JZJoT5F7xNFK9pymv5C0Ymcc9/LIJHtYIggg/yS9YHw8i8O8tgb9pupjeQ== dependencies: - d3-color "1 - 3" + d3-color "1 - 2" d3-interpolate@^1.4.0: version "1.4.0" @@ -9570,6 +9570,17 @@ d3-path@1: resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-2.0.0.tgz#55d86ac131a0548adae241eebfb56b4582dd09d8" integrity sha512-ZwZQxKhBnv9yHaiWd6ZU4x5BtCQ7pXszEV9CU6kRgwIQVQGLMv1oiL4M+MK/n79sYzsj+gcgpPQSctJUsLN7fA== +d3-scale@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-3.3.0.tgz#28c600b29f47e5b9cd2df9749c206727966203f3" + integrity sha512-1JGp44NQCt5d1g+Yy+GeOnZP7xHo0ii8zsQp6PGzd+C1/dl0KGsp9A7Mxwp+1D1o4unbTTxVdU/ZOIEBoeZPbQ== + dependencies: + d3-array "^2.3.0" + d3-format "1 - 2" + d3-interpolate "1.2.0 - 2" + d3-time "^2.1.1" + d3-time-format "2 - 3" + d3-scale@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-1.0.7.tgz#fa90324b3ea8a776422bd0472afab0b252a0945d" @@ -9583,17 +9594,6 @@ d3-scale@^1.0.7: d3-time "1" d3-time-format "2" -d3-scale@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-4.0.2.tgz#82b38e8e8ff7080764f8dcec77bd4be393689396" - integrity sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ== - dependencies: - d3-array "2.10.0 - 3" - d3-format "1 - 3" - d3-interpolate "1.2.0 - 3" - d3-time "2.1.1 - 3" - d3-time-format "2 - 4" - d3-shape@^1.3.4: version "1.3.7" resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7" @@ -9615,24 +9615,24 @@ d3-time-format@2: dependencies: d3-time "1" -"d3-time-format@2 - 4": - version "4.1.0" - resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-4.1.0.tgz#7ab5257a5041d11ecb4fe70a5c7d16a195bb408a" - integrity sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg== +"d3-time-format@2 - 3": + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-3.0.0.tgz#df8056c83659e01f20ac5da5fdeae7c08d5f1bb6" + integrity sha512-UXJh6EKsHBTjopVqZBhFysQcoXSv/5yLONZvkQ5Kk3qbwiUYkdX17Xa1PT6U1ZWXGGfB1ey5L8dKMlFq2DO0Ag== dependencies: - d3-time "1 - 3" + d3-time "1 - 2" d3-time@1: version "1.1.0" resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.1.0.tgz#b1e19d307dae9c900b7e5b25ffc5dcc249a8a0f1" integrity sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA== -"d3-time@1 - 3", "d3-time@2.1.1 - 3": - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.0.0.tgz#65972cb98ae2d4954ef5c932e8704061335d4975" - integrity sha512-zmV3lRnlaLI08y9IMRXSDshQb5Nj77smnfpnd2LrBa/2K281Jijactokeak14QacHs/kKq0AQ121nidNYlarbQ== +"d3-time@1 - 2", d3-time@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-2.1.1.tgz#e9d8a8a88691f4548e68ca085e5ff956724a6682" + integrity sha512-/eIQe/eR4kCQwq7yxi7z4c6qEXf2IYGcjoWB5OOQy4Tq9Uv39/947qlDcN2TLkiTzQWzvnsuYPB9TrWaNfipKQ== dependencies: - d3-array "2 - 3" + d3-array "2" d@1, d@^1.0.1: version "1.0.1" @@ -13379,10 +13379,10 @@ internal-slot@^1.0.2: has "^1.0.3" side-channel "^1.0.2" -"internmap@1 - 2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" - integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== +internmap@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/internmap/-/internmap-1.0.1.tgz#0017cc8a3b99605f0302f2b198d272e015e5df95" + integrity sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw== interpret@^1.0.0: version "1.4.0" From 0dcc64ea10048d2d81e7b9cba90e31c06484a09c Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Tue, 17 May 2022 11:28:38 +0200 Subject: [PATCH 06/13] Fix NaN usage across scales --- .../xy_chart/annotations/line/dimensions.ts | 17 ++++++++--------- .../xy_chart/annotations/rect/dimensions.ts | 12 ++++++------ .../xy_chart/crosshair/crosshair_utils.ts | 4 ++-- .../src/chart_types/xy_chart/rendering/area.ts | 2 +- .../src/chart_types/xy_chart/rendering/bars.ts | 6 +++--- .../chart_types/xy_chart/rendering/points.ts | 4 ++-- .../src/chart_types/xy_chart/rendering/utils.ts | 4 ++-- .../xy_chart/state/selectors/get_brush_area.ts | 8 +++++--- .../xy_chart/state/selectors/get_cursor_band.ts | 9 +++++---- .../state/selectors/get_tooltip_position.ts | 9 +++++---- .../xy_chart/state/selectors/visible_ticks.ts | 8 +++++--- .../chart_types/xy_chart/state/utils/utils.ts | 8 ++++---- .../chart_types/xy_chart/utils/panel_utils.ts | 7 +++++-- packages/charts/src/utils/common.ts | 5 ++++- 14 files changed, 57 insertions(+), 46 deletions(-) diff --git a/packages/charts/src/chart_types/xy_chart/annotations/line/dimensions.ts b/packages/charts/src/chart_types/xy_chart/annotations/line/dimensions.ts index afb05446b2..685a0d1114 100644 --- a/packages/charts/src/chart_types/xy_chart/annotations/line/dimensions.ts +++ b/packages/charts/src/chart_types/xy_chart/annotations/line/dimensions.ts @@ -10,7 +10,7 @@ import { Colors } from '../../../../common/colors'; import { Line } from '../../../../geoms/types'; import { Scale } from '../../../../scales'; import { isBandScale, isContinuousScale } from '../../../../scales/types'; -import { Position, Rotation } from '../../../../utils/common'; +import { isFiniteNumber, Position, Rotation } from '../../../../utils/common'; import { Dimensions, Size } from '../../../../utils/dimensions'; import { GroupId } from '../../../../utils/ids'; import { mergeWithDefaultAnnotationLine } from '../../../../utils/themes/merge_utils'; @@ -56,7 +56,7 @@ function computeYDomainLineAnnotationDimensions( const annotationValueYPosition = yScale.scale(dataValue); // avoid rendering non scalable annotation values - if (Number.isNaN(annotationValueYPosition)) return; + if (!isFiniteNumber(annotationValueYPosition)) return; // avoid rendering annotation with values outside the scale domain if (dataValue < domainStart || dataValue > domainEnd) return; @@ -65,7 +65,7 @@ function computeYDomainLineAnnotationDimensions( horizontal.domain.forEach((horizontalValue) => { const top = vertical.scale(verticalValue); const left = horizontal.scale(horizontalValue); - if (Number.isNaN(top + left)) return; + if (!isFiniteNumber(top + left)) return; const width = isHorizontalChartRotation ? horizontal.bandwidth : vertical.bandwidth; const height = isHorizontalChartRotation ? vertical.bandwidth : horizontal.bandwidth; @@ -139,7 +139,7 @@ function computeXDomainLineAnnotationDimensions( dataValues.forEach((datum: LineAnnotationDatum, i) => { const { dataValue } = datum; let annotationValueXPosition = xScale.scale(dataValue); - if (Number.isNaN(annotationValueXPosition)) { + if (!isFiniteNumber(annotationValueXPosition)) { return; } if (isContinuousScale(xScale) && typeof dataValue === 'number') { @@ -151,8 +151,7 @@ function computeXDomainLineAnnotationDimensions( if (isHistogramMode) { const offset = computeXScaleOffset(xScale, true); const pureScaledValue = xScale.pureScale(dataValue); - if (!Number.isNaN(pureScaledValue)) { - // Number.isFinite is regrettably not a type guard yet https://github.com/microsoft/TypeScript/issues/10038#issuecomment-924115831 + if (isFiniteNumber(pureScaledValue)) { annotationValueXPosition = pureScaledValue - offset; } } else { @@ -165,17 +164,17 @@ function computeXDomainLineAnnotationDimensions( } else { return; } - if (!isFinite(annotationValueXPosition)) { + if (!isFiniteNumber(annotationValueXPosition)) { return; } vertical.domain.forEach((verticalValue) => { horizontal.domain.forEach((horizontalValue) => { - if (Number.isNaN(annotationValueXPosition)) return; + if (!isFiniteNumber(annotationValueXPosition)) return; const top = vertical.scale(verticalValue); const left = horizontal.scale(horizontalValue); - if (Number.isNaN(top + left)) return; + if (!isFiniteNumber(top + left)) return; const width = isHorizontalChartRotation ? horizontal.bandwidth : vertical.bandwidth; const height = isHorizontalChartRotation ? vertical.bandwidth : horizontal.bandwidth; diff --git a/packages/charts/src/chart_types/xy_chart/annotations/rect/dimensions.ts b/packages/charts/src/chart_types/xy_chart/annotations/rect/dimensions.ts index 87c9d152a3..edf3f725da 100644 --- a/packages/charts/src/chart_types/xy_chart/annotations/rect/dimensions.ts +++ b/packages/charts/src/chart_types/xy_chart/annotations/rect/dimensions.ts @@ -8,7 +8,7 @@ import { Scale, ScaleBand, ScaleContinuous } from '../../../../scales'; import { isBandScale, isContinuousScale } from '../../../../scales/types'; -import { isDefined, Position, Rotation } from '../../../../utils/common'; +import { isDefined, isFiniteNumber, Position, Rotation } from '../../../../utils/common'; import { AxisId, GroupId } from '../../../../utils/ids'; import { Point } from '../../../../utils/point'; import { AxisStyle } from '../../../../utils/themes/theme'; @@ -151,7 +151,7 @@ export function computeRectAnnotationDimensions( const id = getAnnotationRectPropsId(annotationSpecId, props.datum, i, vDomainValue, hDomainValue); const top = smallMultiplesScales.vertical.scale(vDomainValue); const left = smallMultiplesScales.horizontal.scale(hDomainValue); - if (Number.isNaN(top + left)) return; + if (!isFiniteNumber(top + left)) return; const panel = { ...panelSize, top, left }; duplicated.push({ ...props, panel, id }); }); @@ -170,7 +170,7 @@ function scaleXonBandScale( const padding = (xScale.step - xScale.originalBandwidth) / 2; let scaledX1 = xScale.scale(x1); let scaledX0 = xScale.scale(x0); - if (Number.isNaN(scaledX1 + scaledX0)) { + if (!isFiniteNumber(scaledX1 + scaledX0)) { return null; } // extend the x1 scaled value to fully cover the last bar @@ -205,9 +205,9 @@ function scaleXonContinuousScale( xScale.totalBarsInCluster > 0 && !isHistogramModeEnabled ? xScale.scale(x1 + xScale.minInterval) : xScale.scale(x1); // the width needs to be computed before adjusting the x anchor const width = Math.abs(scaledX1 - scaledX0); - return Number.isNaN(width) - ? null - : { width, x: scaledX0 - (xScale.bandwidthPadding / 2) * xScale.totalBarsInCluster }; + return isFiniteNumber(width) + ? { width, x: scaledX0 - (xScale.bandwidthPadding / 2) * xScale.totalBarsInCluster } + : null; } /** diff --git a/packages/charts/src/chart_types/xy_chart/crosshair/crosshair_utils.ts b/packages/charts/src/chart_types/xy_chart/crosshair/crosshair_utils.ts index a07f6b38b0..1512a7b285 100644 --- a/packages/charts/src/chart_types/xy_chart/crosshair/crosshair_utils.ts +++ b/packages/charts/src/chart_types/xy_chart/crosshair/crosshair_utils.ts @@ -11,7 +11,7 @@ import { Line, Rect } from '../../../geoms/types'; import { Scale } from '../../../scales'; import { isContinuousScale } from '../../../scales/types'; import { TooltipStickTo } from '../../../specs/constants'; -import { Rotation } from '../../../utils/common'; +import { isFiniteNumber, Rotation } from '../../../utils/common'; import { Dimensions } from '../../../utils/dimensions'; import { Point } from '../../../utils/point'; import { isHorizontalRotation, isVerticalRotation } from '../state/utils/common'; @@ -26,7 +26,7 @@ export function getSnapPosition( totalBarsInCluster = 1, ): { band: number; position: number } | undefined { const position = scale.scale(value); - if (Number.isNaN(position)) { + if (!isFiniteNumber(position)) { return; } diff --git a/packages/charts/src/chart_types/xy_chart/rendering/area.ts b/packages/charts/src/chart_types/xy_chart/rendering/area.ts index 0d426b89bb..a4803b28ad 100644 --- a/packages/charts/src/chart_types/xy_chart/rendering/area.ts +++ b/packages/charts/src/chart_types/xy_chart/rendering/area.ts @@ -53,7 +53,7 @@ export function renderArea( const y1DatumAccessor = getYDatumValueFn(); const y0DatumAccessor = getYDatumValueFn('y0'); const pathGenerator = area() - .x(({ x }) => (xScale.scale(x) ?? NaN) - xScaleOffset) + .x(({ x }) => xScale.scale(x) - xScaleOffset) .y1(y1Fn) .y0(y0Fn) .defined((datum) => { diff --git a/packages/charts/src/chart_types/xy_chart/rendering/bars.ts b/packages/charts/src/chart_types/xy_chart/rendering/bars.ts index 398ba25184..7d4aa1f37f 100644 --- a/packages/charts/src/chart_types/xy_chart/rendering/bars.ts +++ b/packages/charts/src/chart_types/xy_chart/rendering/bars.ts @@ -10,7 +10,7 @@ import { Color } from '../../../common/colors'; import { Scale } from '../../../scales'; import { ScaleType } from '../../../scales/constants'; import { TextMeasure } from '../../../utils/bbox/canvas_text_bbox_calculator'; -import { clamp, mergePartial } from '../../../utils/common'; +import { clamp, isFiniteNumber, mergePartial } from '../../../utils/common'; import { Dimensions } from '../../../utils/dimensions'; import { BandedAccessorType, BarGeometry } from '../../../utils/geometry'; import { BarSeriesStyle, DisplayValueStyle } from '../../../utils/themes/theme'; @@ -49,7 +49,7 @@ export function renderBars( const isInvertedY = yScale.isInverted; return dataSeries.data.reduce((barTuple: BarTuple, datum) => { const xScaled = xScale.scale(datum.x); - if (!xScale.isValueInDomain(datum.x) || Number.isNaN(xScaled)) { + if (!xScale.isValueInDomain(datum.x) || !isFiniteNumber(xScaled)) { return barTuple; // don't create a bar if not within the xScale domain } const { barGeometries, indexedGeometryMap } = barTuple; @@ -67,7 +67,7 @@ export function renderBars( const height = absHeight === 0 ? absHeight : Math.max(minBarHeight, absHeight); // extend nonzero bars const heightExtension = height - absHeight; const isUpsideDown = finiteHeight < 0; - const finiteY = Number.isNaN(y0Scaled + rawY) ? 0 : rawY; + const finiteY = isFiniteNumber(y0Scaled + rawY) ? rawY : 0; const y = isUpsideDown ? finiteY - height + heightExtension : finiteY - heightExtension; const seriesIdentifier: XYChartSeriesIdentifier = { diff --git a/packages/charts/src/chart_types/xy_chart/rendering/points.ts b/packages/charts/src/chart_types/xy_chart/rendering/points.ts index cc37b46f45..daf817ca9b 100644 --- a/packages/charts/src/chart_types/xy_chart/rendering/points.ts +++ b/packages/charts/src/chart_types/xy_chart/rendering/points.ts @@ -8,7 +8,7 @@ import { Color } from '../../../common/colors'; import { Scale } from '../../../scales'; -import { isNil } from '../../../utils/common'; +import { isFiniteNumber, isNil } from '../../../utils/common'; import { Dimensions } from '../../../utils/dimensions'; import { BandedAccessorType, PointGeometry } from '../../../utils/geometry'; import { PointStyle } from '../../../utils/themes/theme'; @@ -63,7 +63,7 @@ export function renderPoints( // don't create the point if it that point was filled const x = xScale.scale(xValue); - if (Number.isNaN(x)) return acc; + if (!isFiniteNumber(x)) return acc; const points: PointGeometry[] = []; const yDatumKeyNames: Array> = isBandChart ? ['y0', 'y1'] : ['y1']; diff --git a/packages/charts/src/chart_types/xy_chart/rendering/utils.ts b/packages/charts/src/chart_types/xy_chart/rendering/utils.ts index e807415499..82f45cf2f1 100644 --- a/packages/charts/src/chart_types/xy_chart/rendering/utils.ts +++ b/packages/charts/src/chart_types/xy_chart/rendering/utils.ts @@ -10,7 +10,7 @@ import { LegendItem } from '../../../common/legend'; import { Scale } from '../../../scales'; import { isLogarithmicScale } from '../../../scales/types'; import { MarkBuffer } from '../../../specs'; -import { getDistance } from '../../../utils/common'; +import { getDistance, isFiniteNumber } from '../../../utils/common'; import { BarGeometry, ClippedRanges, isPointGeometry, PointGeometry } from '../../../utils/geometry'; import { GeometryStateStyle, SharedGeometryStateStyle } from '../../../utils/themes/theme'; import { DataSeriesDatum, FilledValues, XYChartSeriesIdentifier } from '../utils/series'; @@ -67,7 +67,7 @@ export function getClippedRanges( return dataset.reduce((acc, data) => { const xScaled = xScale.scale(data.x); - if (Number.isNaN(xScaled)) return acc; + if (!isFiniteNumber(xScaled)) return acc; const xValue = xScaled - xScaleOffset + xScale.bandwidth / 2; diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/get_brush_area.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/get_brush_area.ts index acb98dc0a3..929b5c04c7 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/get_brush_area.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/get_brush_area.ts @@ -11,7 +11,7 @@ import { GlobalChartState } from '../../../../state/chart_state'; import { createCustomCachedSelector } from '../../../../state/create_selector'; import { getChartRotationSelector } from '../../../../state/selectors/get_chart_rotation'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; -import { clamp, Rotation } from '../../../../utils/common'; +import { clamp, isFiniteNumber, Rotation } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { Point } from '../../../../utils/point'; import { isVerticalRotation } from '../utils/common'; @@ -72,10 +72,12 @@ export function getPointsConstraintToSinglePanel( const hPanel = horizontal.invert(startPlotPoint.x); const vPanel = vertical.invert(startPlotPoint.y); - const hPanelStart = horizontal.scale(hPanel) || 0; + const scaledHorizontal = horizontal.scale(hPanel); + const hPanelStart = isFiniteNumber(scaledHorizontal) ? scaledHorizontal : 0; const hPanelEnd = hPanelStart + horizontal.bandwidth; - const vPanelStart = vertical.scale(vPanel) || 0; + const scaledVertical = vertical.scale(vPanel); + const vPanelStart = isFiniteNumber(scaledVertical) ? scaledVertical : 0; const vPanelEnd = vPanelStart + vertical.bandwidth; const start = { diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/get_cursor_band.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/get_cursor_band.ts index 7fc6eebe83..c89ce1d347 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/get_cursor_band.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/get_cursor_band.ts @@ -11,6 +11,7 @@ import { SettingsSpec, PointerEvent } from '../../../../specs/settings'; import { GlobalChartState } from '../../../../state/chart_state'; import { createCustomCachedSelector } from '../../../../state/create_selector'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; +import { isFiniteNumber } from '../../../../utils/common'; import { isValidPointerOverEvent } from '../../../../utils/events'; import { getCursorBandPosition } from '../../crosshair/crosshair_utils'; import { ChartDimensions } from '../../utils/dimensions'; @@ -92,14 +93,14 @@ function getCursorBand( } } const { horizontal, vertical } = smallMultipleScales; - const topPos = vertical.scale(pointerPosition.verticalPanelValue) || 0; - const leftPos = horizontal.scale(pointerPosition.horizontalPanelValue) || 0; + const topPos = vertical.scale(pointerPosition.verticalPanelValue); + const leftPos = horizontal.scale(pointerPosition.horizontalPanelValue); const panel = { width: horizontal.bandwidth, height: vertical.bandwidth, - top: chartDimensions.top + topPos, - left: chartDimensions.left + leftPos, + top: chartDimensions.top + (isFiniteNumber(topPos) ? topPos : 0), + left: chartDimensions.left + (isFiniteNumber(leftPos) ? leftPos : 0), }; const cursorBand = getCursorBandPosition( settingsSpec.rotation, diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/get_tooltip_position.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/get_tooltip_position.ts index e12471cb39..d1b47b0d22 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/get_tooltip_position.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/get_tooltip_position.ts @@ -10,6 +10,7 @@ import { AnchorPosition } from '../../../../components/portal/types'; import { isTooltipType } from '../../../../specs/settings'; import { createCustomCachedSelector } from '../../../../state/create_selector'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; +import { isFiniteNumber } from '../../../../utils/common'; import { getTooltipAnchorPosition } from '../../crosshair/crosshair_utils'; import { computeChartDimensionsSelector } from './compute_chart_dimensions'; import { computeSmallMultipleScalesSelector } from './compute_small_multiple_scales'; @@ -36,14 +37,14 @@ export const getTooltipAnchorPositionSelector = createCustomCachedSelector( return null; } - const topPos = vertical.scale(projectedPointerPosition.verticalPanelValue) || 0; - const leftPos = horizontal.scale(projectedPointerPosition.horizontalPanelValue) || 0; + const topPos = vertical.scale(projectedPointerPosition.verticalPanelValue); + const leftPos = horizontal.scale(projectedPointerPosition.horizontalPanelValue); const panel = { width: horizontal.bandwidth, height: vertical.bandwidth, - top: chartDimensions.chartDimensions.top + topPos, - left: chartDimensions.chartDimensions.left + leftPos, + top: chartDimensions.chartDimensions.top + (isFiniteNumber(topPos) ? topPos : 0), + left: chartDimensions.chartDimensions.left + (isFiniteNumber(leftPos) ? leftPos : 0), }; return getTooltipAnchorPosition( diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/visible_ticks.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/visible_ticks.ts index 5b73f363fd..28bb049aaf 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/visible_ticks.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/visible_ticks.ts @@ -13,7 +13,7 @@ import { AxisSpec, SettingsSpec } from '../../../../specs'; import { createCustomCachedSelector } from '../../../../state/create_selector'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; import { withTextMeasure } from '../../../../utils/bbox/canvas_text_bbox_calculator'; -import { isRTLString, Position, Rotation } from '../../../../utils/common'; +import { isFiniteNumber, isRTLString, Position, Rotation } from '../../../../utils/common'; import { Size } from '../../../../utils/dimensions'; import { AxisId } from '../../../../utils/ids'; import { multilayerAxisEntry } from '../../axes/timeslip/multilayer_ticks'; @@ -121,6 +121,8 @@ function getVisibleTicks( (enableHistogramMode ? -halfPadding : (scale.bandwidth * shift) / 2) + (scale.isSingleValue() ? 0 : rotationOffset); const firstTickValue = ticks[0]; + const firstTickValueScaled = scale.scale(firstTickValue); + const allTicks: AxisTick[] = makeRaster && isSingleValueScale && typeof firstTickValue === 'number' ? [ @@ -128,8 +130,8 @@ function getVisibleTicks( value: firstTickValue, domainClampedValue: firstTickValue, label: labelFormatter(firstTickValue), - position: (scale.scale(firstTickValue) || 0) + offset, - domainClampedPosition: (scale.scale(firstTickValue) || 0) + offset, + position: (isFiniteNumber(firstTickValueScaled) ? firstTickValueScaled : 0) + offset, + domainClampedPosition: (isFiniteNumber(firstTickValueScaled) ? firstTickValueScaled : 0) + offset, layer: undefined, // no multiple layers with `singleValueScale`s detailedLayer: 0, direction: 'rtl', diff --git a/packages/charts/src/chart_types/xy_chart/state/utils/utils.ts b/packages/charts/src/chart_types/xy_chart/state/utils/utils.ts index 6ba8f49fc4..aa362f628b 100644 --- a/packages/charts/src/chart_types/xy_chart/state/utils/utils.ts +++ b/packages/charts/src/chart_types/xy_chart/state/utils/utils.ts @@ -353,13 +353,13 @@ function renderGeometries( const { stackMode } = ds; - const leftPos = smHScale.scale(ds.smHorizontalAccessorValue) || 0; - const topPos = smVScale.scale(ds.smVerticalAccessorValue) || 0; + const leftPos = smHScale.scale(ds.smHorizontalAccessorValue); + const topPos = smVScale.scale(ds.smVerticalAccessorValue); const panel: Dimensions = { width: smHScale.bandwidth, height: smVScale.bandwidth, - top: topPos, - left: leftPos, + top: isFiniteNumber(topPos) ? topPos : 0, + left: isFiniteNumber(leftPos) ? leftPos : 0, }; const dataSeriesKey = getSeriesKey( { diff --git a/packages/charts/src/chart_types/xy_chart/utils/panel_utils.ts b/packages/charts/src/chart_types/xy_chart/utils/panel_utils.ts index 085c9e4079..a5bc6920dc 100644 --- a/packages/charts/src/chart_types/xy_chart/utils/panel_utils.ts +++ b/packages/charts/src/chart_types/xy_chart/utils/panel_utils.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import { isFiniteNumber } from '../../../utils/common'; import { Point } from '../../../utils/point'; import { SmallMultipleScales } from '../state/selectors/compute_small_multiple_scales'; @@ -28,9 +29,11 @@ export function getPerPanelMap( return [ ...acc, ...horizontal.domain.reduce>((hAcc, horizontalValue) => { + const x = horizontal.scale(horizontalValue); + const y = vertical.scale(verticalValue); const panelAnchor: Point = { - x: horizontal.scale(horizontalValue) || 0, - y: vertical.scale(verticalValue) || 0, + x: isFiniteNumber(x) ? x : 0, + y: isFiniteNumber(y) ? y : 0, }; const fnObj = fn(panelAnchor, horizontalValue, verticalValue, scales); return fnObj ? [...hAcc, { panelAnchor, horizontalValue, verticalValue, ...fnObj }] : hAcc; diff --git a/packages/charts/src/utils/common.ts b/packages/charts/src/utils/common.ts index edb7f0436f..54e4f39789 100644 --- a/packages/charts/src/utils/common.ts +++ b/packages/charts/src/utils/common.ts @@ -615,7 +615,10 @@ export function getOppositeAlignment Date: Fri, 27 May 2022 17:20:57 +0200 Subject: [PATCH 07/13] test: removing check for zero values fixed in #1674 --- .../xy_chart/rendering/rendering.bubble.test.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/charts/src/chart_types/xy_chart/rendering/rendering.bubble.test.ts b/packages/charts/src/chart_types/xy_chart/rendering/rendering.bubble.test.ts index 6a41ffbcae..e0779ee961 100644 --- a/packages/charts/src/chart_types/xy_chart/rendering/rendering.bubble.test.ts +++ b/packages/charts/src/chart_types/xy_chart/rendering/rendering.bubble.test.ts @@ -360,14 +360,6 @@ describe('Rendering points - bubble', () => { expect(points.length).toBe(7); // all the points including null geometries expect(geometriesIndex.size).toEqual(9); - - const zeroValueIndexdGeometry = geometriesIndex.find(null, { - x: 56.25, - y: 100, - }); - expect(zeroValueIndexdGeometry).toBeDefined(); - expect(zeroValueIndexdGeometry.length).toBe(3); - expect(zeroValueIndexdGeometry.find(({ value: { x } }) => x === 5)).toBeDefined(); }); }); describe('Remove points datum is not in domain', () => { From a9d614924f107c6b671e9f99b09ec4d9401e9679 Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Fri, 27 May 2022 17:26:49 +0200 Subject: [PATCH 08/13] test: update precision on some calculations --- .../rendering/__snapshots__/rendering.bands.test.ts.snap | 2 +- .../chart_types/xy_chart/rendering/rendering.areas.test.ts | 3 ++- .../chart_types/xy_chart/rendering/rendering.lines.test.ts | 3 ++- .../state/__snapshots__/chart_state.debug.test.ts.snap | 4 ++-- packages/charts/src/chart_types/xy_chart/utils/scales.test.ts | 4 ++-- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/charts/src/chart_types/xy_chart/rendering/__snapshots__/rendering.bands.test.ts.snap b/packages/charts/src/chart_types/xy_chart/rendering/__snapshots__/rendering.bands.test.ts.snap index 95e6f93301..c351a3beb1 100644 --- a/packages/charts/src/chart_types/xy_chart/rendering/__snapshots__/rendering.bands.test.ts.snap +++ b/packages/charts/src/chart_types/xy_chart/rendering/__snapshots__/rendering.bands.test.ts.snap @@ -774,7 +774,7 @@ Array [ }, "width": 25, "x": 75, - "y": 20, + "y": 19.999999999999996, }, ] `; diff --git a/packages/charts/src/chart_types/xy_chart/rendering/rendering.areas.test.ts b/packages/charts/src/chart_types/xy_chart/rendering/rendering.areas.test.ts index a1f1ce00a2..7144e4d5e2 100644 --- a/packages/charts/src/chart_types/xy_chart/rendering/rendering.areas.test.ts +++ b/packages/charts/src/chart_types/xy_chart/rendering/rendering.areas.test.ts @@ -13,6 +13,7 @@ import { MockStore } from '../../../mocks/store'; import { ScaleType } from '../../../scales/constants'; import { Spec } from '../../../specs'; import { GlobalChartState } from '../../../state/chart_state'; +import { isFiniteNumber } from '../../../utils/common'; import { PointGeometry, AreaGeometry } from '../../../utils/geometry'; import { LIGHT_THEME } from '../../../utils/themes/light_theme'; import { computeSeriesDomainsSelector } from '../state/selectors/compute_series_domains'; @@ -407,7 +408,7 @@ describe('Rendering points - areas', () => { expect(zeroValueIndexdGeometry).toBeDefined(); expect(zeroValueIndexdGeometry.length).toBe(1); // moved to the bottom of the chart - expect(zeroValueIndexdGeometry[0].y).toBe(Infinity); + expect(isFiniteNumber(zeroValueIndexdGeometry[0].y)).toBe(false); // default area theme point radius expect((zeroValueIndexdGeometry[0] as PointGeometry).radius).toBe(LIGHT_THEME.areaSeriesStyle.point.radius); }); diff --git a/packages/charts/src/chart_types/xy_chart/rendering/rendering.lines.test.ts b/packages/charts/src/chart_types/xy_chart/rendering/rendering.lines.test.ts index c80bbeeab6..59bbcf4de1 100644 --- a/packages/charts/src/chart_types/xy_chart/rendering/rendering.lines.test.ts +++ b/packages/charts/src/chart_types/xy_chart/rendering/rendering.lines.test.ts @@ -10,6 +10,7 @@ import { MockGlobalSpec, MockSeriesSpec } from '../../../mocks/specs'; import { MockStore } from '../../../mocks/store'; import { ScaleContinuousType } from '../../../scales'; import { ScaleType } from '../../../scales/constants'; +import { isFiniteNumber } from '../../../utils/common'; import { PointGeometry } from '../../../utils/geometry'; import { LIGHT_THEME } from '../../../utils/themes/light_theme'; import { computeSeriesGeometriesSelector } from '../state/selectors/compute_series_geometries'; @@ -383,7 +384,7 @@ describe('Rendering points - line', () => { expect(zeroValueIndexdGeometry).toBeDefined(); expect(zeroValueIndexdGeometry.length).toBe(1); // the zero value is moved vertically to infinity - expect((zeroValueIndexdGeometry[0] as PointGeometry).y).toBe(Infinity); + expect(isFiniteNumber((zeroValueIndexdGeometry[0] as PointGeometry).y)).toBe(false); expect((zeroValueIndexdGeometry[0] as PointGeometry).radius).toBe(LIGHT_THEME.lineSeriesStyle.point.radius); }); }); diff --git a/packages/charts/src/chart_types/xy_chart/state/__snapshots__/chart_state.debug.test.ts.snap b/packages/charts/src/chart_types/xy_chart/state/__snapshots__/chart_state.debug.test.ts.snap index 0fb8a2c445..76ff0712b6 100644 --- a/packages/charts/src/chart_types/xy_chart/state/__snapshots__/chart_state.debug.test.ts.snap +++ b/packages/charts/src/chart_types/xy_chart/state/__snapshots__/chart_state.debug.test.ts.snap @@ -89,7 +89,7 @@ Object { "color": "#54B399", "key": "groupId{__global__}spec{spec1}yAccessor{1}splitAccessors{}", "name": "spec1", - "path": "M0,141.5L58,99.4L145,0", + "path": "M0,141.5L58,99.39999999999999L145,0", "points": Array [ Object { "mark": null, @@ -317,7 +317,7 @@ Object { "color": "#54B399", "key": "groupId{__global__}spec{spec1}yAccessor{1}splitAccessors{}", "name": "spec1", - "path": "M0,141.5L58,99.4L145,0", + "path": "M0,141.5L58,99.39999999999999L145,0", "points": Array [ Object { "mark": null, diff --git a/packages/charts/src/chart_types/xy_chart/utils/scales.test.ts b/packages/charts/src/chart_types/xy_chart/utils/scales.test.ts index 5e6a76fbd0..11a039ed10 100644 --- a/packages/charts/src/chart_types/xy_chart/utils/scales.test.ts +++ b/packages/charts/src/chart_types/xy_chart/utils/scales.test.ts @@ -38,8 +38,8 @@ describe('Series scales', () => { const expectedBandwidth = 120 / 4; expect(scale.bandwidth).toBe(expectedBandwidth); expect(scale.scale(0)).toBe(expectedBandwidth * 3); - expect(scale.scale(1)).toBe(expectedBandwidth * 2); - expect(scale.scale(2)).toBe(expectedBandwidth); + expect(scale.scale(1)).toBeCloseTo(expectedBandwidth * 2); + expect(scale.scale(2)).toBeCloseTo(expectedBandwidth); expect(scale.scale(3)).toBe(0); }); From 2a059224344c2910a5eeed4051b4f4593d4501a5 Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Fri, 27 May 2022 18:52:13 +0200 Subject: [PATCH 09/13] fix: remove wrong isFinite check on inverted scale --- .../state/selectors/get_elements_at_cursor_pos.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/get_elements_at_cursor_pos.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/get_elements_at_cursor_pos.ts index fae8a67c11..8f0b6a8565 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/get_elements_at_cursor_pos.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/get_elements_at_cursor_pos.ts @@ -9,6 +9,7 @@ import { PointerEvent } from '../../../../specs'; import { GlobalChartState } from '../../../../state/chart_state'; import { createCustomCachedSelector } from '../../../../state/create_selector'; +import { isNil } from '../../../../utils/common'; import { isValidPointerOverEvent } from '../../../../utils/events'; import { IndexedGeometry } from '../../../../utils/geometry'; import { ChartDimensions } from '../../utils/dimensions'; @@ -39,14 +40,14 @@ export const getElementAtCursorPositionSelector = createCustomCachedSelector( function getElementAtCursorPosition( orientedProjectedPointerPosition: PointerPosition, - scales: ComputedScales, + { xScale }: ComputedScales, geometriesIndexKeys: (string | number)[], geometriesIndex: IndexedGeometryMap, externalPointerEvent: PointerEvent | null, { chartDimensions }: ChartDimensions, ): IndexedGeometry[] { - if (isValidPointerOverEvent(scales.xScale, externalPointerEvent)) { - const x = scales.xScale.pureScale(externalPointerEvent.x); + if (isValidPointerOverEvent(xScale, externalPointerEvent)) { + const x = xScale.pureScale(externalPointerEvent.x); if (Number.isNaN(x) || x > chartDimensions.width + chartDimensions.left || x < 0) { return []; @@ -54,14 +55,15 @@ function getElementAtCursorPosition( // TODO: Handle external event with spatial points return geometriesIndex.find(externalPointerEvent.x, { x: -1, y: -1 }); } - const xValue = scales.xScale.invertWithStep(orientedProjectedPointerPosition.x, geometriesIndexKeys); - if (!Number.isFinite(xValue.value)) { + const { value } = xScale.invertWithStep(orientedProjectedPointerPosition.x, geometriesIndexKeys); + + if (isNil(value)) { return []; } // get the elements at cursor position return geometriesIndex .find( - xValue.value, + value, orientedProjectedPointerPosition, orientedProjectedPointerPosition.horizontalPanelValue, orientedProjectedPointerPosition.verticalPanelValue, From df0f6a0daabb45c6ec35e5aa7e6673d36ef558fa Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Mon, 30 May 2022 14:57:01 +0200 Subject: [PATCH 10/13] test: add test with a single data pint --- .../axes/15_single_value_domain.story.tsx | 39 +++++++++++++++++++ storybook/stories/axes/axes.stories.tsx | 1 + 2 files changed, 40 insertions(+) create mode 100644 storybook/stories/axes/15_single_value_domain.story.tsx diff --git a/storybook/stories/axes/15_single_value_domain.story.tsx b/storybook/stories/axes/15_single_value_domain.story.tsx new file mode 100644 index 0000000000..b7b24c2d53 --- /dev/null +++ b/storybook/stories/axes/15_single_value_domain.story.tsx @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; + +import { LineSeries, Chart, ScaleType, Settings, Axis, Position } from '@elastic/charts'; + +import { useBaseTheme } from '../../use_base_theme'; + +export const Example = () => { + return ( + + + + + + + ); +}; + +Example.parameters = { + markdown: `A series with a single datapoint doesn't have enough data to compute the horizontal x domain. + In this case the chart should render the data point at the middle of the axis. + The same should happen on the Y axis if the domain is configured to be limited to a single value, as in this example. + It should show the full scale from the baseline to the Y value if the domain is automatically computed. +`, +}; diff --git a/storybook/stories/axes/axes.stories.tsx b/storybook/stories/axes/axes.stories.tsx index 2df6221440..347a5fd51f 100644 --- a/storybook/stories/axes/axes.stories.tsx +++ b/storybook/stories/axes/axes.stories.tsx @@ -25,3 +25,4 @@ export { Example as fitDomain } from './11_fit_domain_extent.story'; export { Example as duplicateTicks } from './12_duplicate_ticks.story'; export { Example as labelFormatting } from './13_label_formatting.story'; export { Example as duplicateTicks2 } from './14_duplicate_ticks_2.story'; +export { Example as testSingleValueDomain } from './15_single_value_domain.story'; From 4f68952fda6e4d18e929555dfe3b78510565644a Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Mon, 30 May 2022 15:05:33 +0200 Subject: [PATCH 11/13] test: update VRTs --- ...e-domain-visually-looks-correct-1-snap.png | Bin 0 -> 2786 bytes ...s-0-0-and-y-0-and-y-1-specified-1-snap.png | Bin 7084 -> 7131 bytes ...-0-and-y-1-values-are-specified-1-snap.png | Bin 7215 -> 7214 bytes ...ation-when-y-domain-fit-is-true-1-snap.png | Bin 7136 -> 7140 bytes ...annotation-when-y-domain-is-0-0-1-snap.png | Bin 7084 -> 7131 bytes ...-a-degenerate-zero-width-domain-1-snap.png | Bin 10085 -> 10002 bytes 6 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-axes-test-single-value-domain-visually-looks-correct-1-snap.png diff --git a/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-axes-test-single-value-domain-visually-looks-correct-1-snap.png b/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-axes-test-single-value-domain-visually-looks-correct-1-snap.png new file mode 100644 index 0000000000000000000000000000000000000000..ccf45b0410b215e928996ed0d84a0278cb333e9a GIT binary patch literal 2786 zcmeH}=~I(O7{E6$qJy>2ktxU}f(2S_p(9rV0R##}8E~K+at08?VSq{_R~neM8t^ES z9?}*eBZ46u;qFTc2@E1mhieSHNw|_!&Ljj(5lBK3`r5ys(&?8DpLXZj-I-^f-Tm#a z{8DJpF++1h0KhS9a6mW!dJ+Io=|>EZh;$%LhBTF3HS48$1auFgk_kLzb_%e3mH?G0IUiTaA*dr&Y^ta|dC+`s4T z{cb5rwS_Nfrj0sHEgkh~r0ppmsg;{yO`B?*pc5#$R9)_?{tUM&I2#gqWka*XKL&5+ zllLa+VIm1JA|fJ4XfWWJ+oNZkW<%xl^u*+^&oM4megx}uWcm6!4{nMUskHPknvT{g zxzQWCiZWPybW+nsR{Z{Kt9GYR_Y#_r(M3tk%Mb^%b{UWu&wcz<-Xvw4o12^T=^azz zi=pz^n3#rZcxEP+aP8WZKoIkxlM|oI<@!=|XSgCAQ~@-5za{lCMcSoKwXl3T zRx_SY!5l7yEZ^r+un6m%KOikQ?h}6hlAQ<3_xTMltGzvs_~AgBq>gcldDjE#;?X*4AH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TQaGnHbp(N60Xi0x#~vUF*H67!YHRJmgDPffrpsJF>YCOszC{$3OkfEAya|Ju z`-m7rk>V(+kz5CBgkg}uvPJuz!17UK)*DtmoC@=wGl1w|G3%4HEzTe@D@vEEM_TTs z`Del#`K6^hT+&QA0BIw=bCr(NBeRiK7v8?8TYP(+0V!XQQB*QymWx^L=S~#mB?(0R zYCLQijF(YYDqsqZy7CD)*~4Gn`aeCUtJb*FpGxb0X@H3U3Wfcf+y1iee)#D>00k9Y AZvX%Q diff --git a/integration/tests/__image_snapshots__/annotations-stories-test-ts-annotations-stories-render-with-zero-domain-or-fit-to-domain-does-not-show-annotation-with-y-domain-is-20-20-and-y-0-and-y-1-values-are-specified-1-snap.png b/integration/tests/__image_snapshots__/annotations-stories-test-ts-annotations-stories-render-with-zero-domain-or-fit-to-domain-does-not-show-annotation-with-y-domain-is-20-20-and-y-0-and-y-1-values-are-specified-1-snap.png index 80d569ed7c3a1f7b93eb2e194396a5acf8035ee2..090ab93c0a9b11e2f820bd7f9e541f7877056dd2 100644 GIT binary patch literal 7214 zcmeHMX;@Qd+CJ7++bS>}YpJr;f?}n>C`DumXsKdEh!qf#B`OL6LWBSz0TMbcxB(KB zokYu4K!~7%>?)N-mSAGo7g=#pC=GH;EMt?~L~n!P-^U2D^N>GI1=clfo3$3%f95AM1o`sNzjK+tms957 zo7m|QUYOf}AW<2o3@^KlUcS8k-^>5FI<)l0&bwEJW@lz*>Upg}kf6WB z*M!Xu_fe(_vGiU-Ehb@y-Rse&1TKfe8LL}^>^IKe$4N49PwnXFc=Gh=`8U5F#L`Pk zOZ%wHGwzn^2;!J|Q(M8eS|uO4{dGK3KC0VYNg`NE%GqO?T8aw{@_33c8GxN{|0>?Y z)in)nwODxTfTb6EHh4XcTCD#QYjb7Pg-*`<)EolCY z4M}`gy2EXdivDZA?K)IZU{l{Z{-C$3M}vW_m;x; zw3U>UFc{!~>5-_?%J1X_B4*eXG%wY4<`6CSD=K3!~}r3@AM z`IVMeu&|szK80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rV9`` zIYO9k74w;rTvpAn>v>_RBT#{((?|ciE)t{|243!=;v{9fPvRRhuiudJf?!)QQ&1St zeo}TKO0(FUESkWryVu{7Pf`_(%F>dp(hjL%!7Io46j!M8hl6p9PzZey^jKys5Z};X^zppMQM3=8Qip#)yXkdY@Qa|6OJ`PhLYdoGeNZ)iu`N7t!H>_Yj z+MpPGabR#z*Q@Pe`n7sFlZNnh9)$&Pa3{Ng5yHAKcaT+q8Li0rCuX1uajNqXk~LeW zHQ}~wGsVF3C(@%In5*%%+tNWc1f+K4BlP60(CpbUkK-4k?E!xLcWONz0{ zFx1O3i>0Fzj=Nfw-+%=$hcOq-De(i|c{N!E{Mr6ERdj9+_LVD!lTajO2J?0%gcq&P z&97^r0MHE=t)e|htrcD-zYuO&$aGUve1{0%I@FS5Vq#h-7!0WXOoi}6^n|FbU&BCm z!a}F;E1W?*VA_+OZm_1HbkOSz+OKH)vwNuw7{;VG#c8nW<^74x;z55FYUjtB;yR)7 zIhIKtZ{zpQPw}eL8h%^y(F68Hr$2&~a#{vWvPQE3jntxvxI`E!%r5tD5T>#}{Obyx h`}}MFz?zh72+*Q8o!EhU1(PNOd(!$u@v$F%{!c-%sCEDV diff --git a/integration/tests/__image_snapshots__/annotations-stories-test-ts-annotations-stories-render-with-zero-domain-or-fit-to-domain-show-annotation-when-y-domain-is-0-0-1-snap.png b/integration/tests/__image_snapshots__/annotations-stories-test-ts-annotations-stories-render-with-zero-domain-or-fit-to-domain-show-annotation-when-y-domain-is-0-0-1-snap.png index 4fe9d32d2d1114acc392b1c760283fc1c52efb02..6b46e08dd61df4af78b6d8d71923bcda3ad4154f 100644 GIT binary patch literal 7131 zcmeHMX;4#Xx;`{lnQjHHV|OF6%?N@mDhepFB+*vEfPe}}t3XsX5dmct0>Rc+v{jHG zggq!*v#SWm5~89)SOT)I!37fb03kp^mirzZYo_Y{nX3MAf83!gImJ0S=R5EBywCFH z_E8%P`R_Ju0QwpLfXG_vpzxn~uG;%q$ya*T1^z zD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time-axis-with-a-single-point-and-a-degenerate-zero-width-domain-1-snap.png b/integration/tests/__image_snapshots__/axis-stories-test-ts-axis-stories-renders-multilayer-time-axis-with-a-single-point-and-a-degenerate-zero-width-domain-1-snap.png index 0ff44d0433df4cec1e098f701b5c6276215c2b45..329d70e1b43f0b1dd68fe2c2e5ff511577219444 100644 GIT binary patch literal 10002 zcmdUVXH*nhw{4>$Cg2z`0V<6sAQ%YJN;n3fiAoa5f*=`z1|*{%MMXdwfg@Q7O^}S_ zBr2##YBETc(2dZ9ZjjJ&*XH;+#v9{(_x*U|j`3Z8SX#BKYS-Rt%{kXx{rHNS0{fQz zTQC?5J6`dU1_rZ^g2Av@ZrTWEs8!|@aA0xPP`H4}Y&Zy44q@<@{?xh?J=yC{2xHu> znHf7OdG709^}_OsC;zw-e<*c$)2l}zn>KB-G>ghPT{LiG-+4iowD?E3aJ{;xt{VbA zKHYm(O)&mQk#^k>`IYIRE7*_|*yH$Z_(L~~>sD?!E8qN7{^`Mj+ouI*wT4gL9b@b~ zUbDjs6ecL&nDN(dh53Z3gkO=jOmr%ifRkNU}WX+Y`|bw-C1x^LO2F4vqyg!1f(YJlc4tDEI5jJ$;&Xn)fSkPFE!7 zOH_iU71PaFFlwfAcSOD)eqK_7b3f1X;r)AEZdT0Gt7EpU;qNXhP3Ha^4>A#SDwV2J=vZv<KUI`7;(@n)o9OOm7InXH@CIa=yIiZ#~}hl9>4Uv(gE}60J|4KIzD#RS~}Rg%B~> zQ)n|i@HV&0R%h+Yh0P7{C~I&yJ|z!4{xSCW@#CL{uyDqY0gKr8IwN6x_wL;p_K;<} zxVd}7bVlTDWUx_+4~=VC~aeT5)iNr{PA z##FC9u{BAVOK2Efk zPO(Ufzzw%Eb#cTgr{a8vei=w{W!F+e<#6F<2#8n8qUEh)O#NZk(ig)hVdG7$@WFwB z+Sb--I2S4wPi-LuLz;VuP}n-TyY9rLC6BI2R|p&R z1cl&v_ti|p(t;AzIRY09JfsWoVo3bCGA27Q94s4NZ_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ined return in scale project --- packages/charts/src/scales/scale_continuous.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/charts/src/scales/scale_continuous.ts b/packages/charts/src/scales/scale_continuous.ts index 231f52b9b1..3b6a8b5db0 100644 --- a/packages/charts/src/scales/scale_continuous.ts +++ b/packages/charts/src/scales/scale_continuous.ts @@ -79,7 +79,7 @@ export class ScaleContinuous implements Scale { readonly timeZone: string; readonly barsPadding: number; readonly isSingleValueHistogram: boolean; - private readonly project: (d: number) => number | undefined; + private readonly project: (d: number) => number; private readonly inverseProject: (d: number) => number | Date; constructor( @@ -174,20 +174,18 @@ export class ScaleContinuous implements Scale { : (d3Scale as D3ScaleNonTime).ticks(scaleOptions.desiredTickCount); this.domain = nicePaddedDomain; - this.project = (d: number) => d3Scale(d); + this.project = (d: number) => d3Scale(d) ?? NaN; this.inverseProject = (d: number) => d3Scale.invert(d); } scale(value?: PrimitiveValue) { return typeof value === 'number' - ? (this.project(value) ?? NaN) + (this.bandwidthPadding / 2) * this.totalBarsInCluster + ? this.project(value) + (this.bandwidthPadding / 2) * this.totalBarsInCluster : NaN; } pureScale(value?: PrimitiveValue) { - return typeof value === 'number' - ? this.project(this.bandwidth === 0 ? value : value + this.minInterval / 2) ?? NaN - : NaN; + return typeof value === 'number' ? this.project(this.bandwidth === 0 ? value : value + this.minInterval / 2) : NaN; } ticks() { From cf6453be0b012c597b3a5fe2ed6d101e26aaaf47 Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Wed, 1 Jun 2022 10:52:01 +0200 Subject: [PATCH 13/13] fix: remove last wrong check on xValue --- .../chart_types/xy_chart/state/selectors/get_cursor_band.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/charts/src/chart_types/xy_chart/state/selectors/get_cursor_band.ts b/packages/charts/src/chart_types/xy_chart/state/selectors/get_cursor_band.ts index c89ce1d347..23b0d479e4 100644 --- a/packages/charts/src/chart_types/xy_chart/state/selectors/get_cursor_band.ts +++ b/packages/charts/src/chart_types/xy_chart/state/selectors/get_cursor_band.ts @@ -73,7 +73,7 @@ function getCursorBand( if (isValidPointerOverEvent(xScale, externalPointerEvent)) { fromExternalEvent = true; const x = xScale.pureScale(externalPointerEvent.x); - if (Number.isNaN(x) || x > chartDimensions.width || x < 0) { + if (!isFiniteNumber(x) || x > chartDimensions.width || x < 0) { return; } pointerPosition = { @@ -88,7 +88,7 @@ function getCursorBand( }; } else { xValue = xScale.invertWithStep(orientedProjectedPointerPosition.x, geometriesIndexKeys); - if (!xValue) { + if (!isFiniteNumber(xValue.value)) { return; } }