@nova-ui/charts 13.0.1 → 13.0.2-3955

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/chart-popover/chart-popover.component.d.ts +1 -1
  2. package/chart-tooltips/chart-tooltips.component.d.ts +1 -1
  3. package/core/common/data-manager.d.ts +1 -1
  4. package/core/plugins/chart-popover-plugin.d.ts +2 -7
  5. package/core/plugins/gauge/donut-gauge-labels-plugin.d.ts +1 -1
  6. package/core/plugins/gauge/linear-gauge-labels-plugin.d.ts +1 -1
  7. package/core/plugins/interaction/interaction-label-plugin.d.ts +1 -1
  8. package/core/plugins/interaction/interaction-line-plugin.d.ts +1 -1
  9. package/core/plugins/mouse-interactive-area-plugin.d.ts +1 -1
  10. package/core/plugins/radial-popover-plugin.d.ts +2 -6
  11. package/core/plugins/render-engine-plugin.d.ts +1 -1
  12. package/core/plugins/tooltips/chart-tooltips-plugin.d.ts +1 -1
  13. package/core/plugins/zoom-plugin.d.ts +1 -1
  14. package/esm2020/chart/chart.component.mjs +1 -1
  15. package/esm2020/chart-donut-content/chart-donut-content.component.mjs +1 -1
  16. package/esm2020/chart-popover/chart-popover.component.mjs +1 -1
  17. package/esm2020/chart-tooltips/chart-tooltip.directive.mjs +4 -5
  18. package/esm2020/chart-tooltips/chart-tooltips.component.mjs +6 -6
  19. package/esm2020/core/chart-assists/chart-assist.mjs +5 -2
  20. package/esm2020/core/chart-assists/spark-chart-assist.mjs +2 -2
  21. package/esm2020/core/chart.mjs +1 -1
  22. package/esm2020/core/common/data-manager.mjs +1 -1
  23. package/esm2020/core/common/event-bus.mjs +1 -1
  24. package/esm2020/core/common/palette/markers/path-marker.mjs +1 -1
  25. package/esm2020/core/common/renderer.mjs +2 -2
  26. package/esm2020/core/common/scales/band-scale.mjs +3 -3
  27. package/esm2020/core/common/scales/domain-calculation/domain-with-auxiliary-series.mjs +1 -1
  28. package/esm2020/core/common/scales/domain-calculation/merge-domains.mjs +2 -2
  29. package/esm2020/core/common/scales/formatters/datetime-formatter.mjs +22 -12
  30. package/esm2020/core/common/scales/helpers/domain.mjs +1 -1
  31. package/esm2020/core/common/scales/time-interval-scale.mjs +1 -1
  32. package/esm2020/core/common/utility.service.mjs +2 -2
  33. package/esm2020/core/grid/radial-grid.mjs +1 -1
  34. package/esm2020/core/grid/xy-grid.mjs +2 -2
  35. package/esm2020/core/plugins/chart-donut-content-plugin.mjs +1 -1
  36. package/esm2020/core/plugins/chart-popover-plugin.mjs +1 -1
  37. package/esm2020/core/plugins/gauge/donut-gauge-labels-plugin.mjs +1 -1
  38. package/esm2020/core/plugins/gauge/linear-gauge-labels-plugin.mjs +1 -1
  39. package/esm2020/core/plugins/interaction/interaction-label-plugin.mjs +1 -1
  40. package/esm2020/core/plugins/interaction/interaction-line-plugin.mjs +1 -1
  41. package/esm2020/core/plugins/mouse-interactive-area-plugin.mjs +1 -1
  42. package/esm2020/core/plugins/radial-popover-plugin.mjs +1 -1
  43. package/esm2020/core/plugins/render-engine-plugin.mjs +1 -1
  44. package/esm2020/core/plugins/tooltips/chart-tooltips-plugin.mjs +1 -1
  45. package/esm2020/core/plugins/zoom-plugin.mjs +1 -1
  46. package/esm2020/gauge/gauge-util.mjs +1 -1
  47. package/esm2020/legend/legend-tile/rich-legend-tile/rich-legend-tile.component.mjs +1 -1
  48. package/esm2020/legend/legend.component.mjs +1 -1
  49. package/esm2020/renderers/accessors/xy-accessors.mjs +1 -1
  50. package/esm2020/renderers/area/area-renderer.mjs +3 -3
  51. package/esm2020/renderers/area/stacked-percentage-area-preprocessor.mjs +1 -1
  52. package/esm2020/renderers/bar/bar-renderer.mjs +1 -2
  53. package/esm2020/renderers/bar/highlight-strategies/bar-highlight-strategy.mjs +3 -3
  54. package/esm2020/renderers/bar/highlight-strategies/bar-series-highlight-strategy.mjs +1 -1
  55. package/esm2020/renderers/bar/stacked-preprocessor.mjs +2 -2
  56. package/esm2020/renderers/line/line-renderer.mjs +2 -2
  57. package/esm2020/renderers/marker-utils.mjs +1 -1
  58. package/esm2020/renderers/radial/pie-renderer.mjs +1 -1
  59. package/esm2020/renderers/radial/radial-grid-fn.mjs +1 -1
  60. package/esm2020/renderers/radial/radial-renderer.mjs +4 -6
  61. package/esm2020/renderers/side-indicator-renderer.mjs +1 -1
  62. package/esm2020/thresholds/thresholds-service.mjs +1 -1
  63. package/fesm2015/nova-ui-charts.mjs +61 -55
  64. package/fesm2015/nova-ui-charts.mjs.map +1 -1
  65. package/fesm2020/nova-ui-charts.mjs +61 -55
  66. package/fesm2020/nova-ui-charts.mjs.map +1 -1
  67. package/package.json +2 -2
  68. package/renderers/area/area-renderer.d.ts +1 -1
  69. package/sdk/atoms/chart/atoms/chart.atom.d.ts +4 -4
  70. package/sdk/atoms/chart/atoms/chart.atom.js +28 -28
  71. package/sdk/atoms/chart/atoms/chart.atom.js.map +1 -1
  72. package/sdk/atoms/chart/atoms/lasagna.atom.d.ts +1 -1
  73. package/sdk/atoms/chart/atoms/lasagna.atom.js +8 -7
  74. package/sdk/atoms/chart/atoms/lasagna.atom.js.map +1 -1
  75. package/sdk/atoms/chart/atoms/marker.atom.js +1 -1
  76. package/sdk/atoms/chart/atoms/marker.atom.js.map +1 -1
  77. package/sdk/atoms/chart/boosters/interactive.booster.js +1 -1
  78. package/sdk/atoms/chart/boosters/interactive.booster.js.map +1 -1
  79. package/sdk/atoms/chart/boosters/zoom.booster.js +2 -2
  80. package/sdk/atoms/chart/boosters/zoom.booster.js.map +1 -1
  81. package/sdk/locale/messages.en.xlf +16 -16
@@ -5,8 +5,7 @@ import { trigger, transition, style, animate } from '@angular/animations';
5
5
  import * as i1 from '@angular/common';
6
6
  import * as i1$1 from '@angular/cdk/overlay';
7
7
  import { OverlayModule } from '@angular/cdk/overlay';
8
- import { forceCollide, forceSimulation } from 'd3-force';
9
- import { select, local, event, mouse } from 'd3-selection';
8
+ import { forceCollide, forceSimulation, select, extent, min as min$1, max as max$1, scaleBand, bisect, axisLeft, axisRight, axisBottom, axisTop, timeMinute, timeDay, timeMonth, timeYear } from 'd3';
10
9
  import each from 'lodash/each';
11
10
  import isEqual from 'lodash/isEqual';
12
11
  import isNil from 'lodash/isNil';
@@ -30,7 +29,8 @@ import startsWith from 'lodash/startsWith';
30
29
  import trim from 'lodash/trim';
31
30
  import trimEnd from 'lodash/trimEnd';
32
31
  import trimStart from 'lodash/trimStart';
33
- import { extent, min, max, bisect } from 'd3-array';
32
+ import { min, max, bisect as bisect$1 } from 'd3-array';
33
+ import { local, select as select$1, event, mouse } from 'd3-selection';
34
34
  import defaultsDeep from 'lodash/defaultsDeep';
35
35
  import flatten from 'lodash/flatten';
36
36
  import uniq from 'lodash/uniq';
@@ -40,15 +40,13 @@ import { curveLinear, line, pie, arc, area } from 'd3-shape';
40
40
  import filter from 'lodash/filter';
41
41
  import includes from 'lodash/includes';
42
42
  import keyBy from 'lodash/keyBy';
43
- import { axisLeft, axisRight, axisBottom, axisTop } from 'd3-axis';
44
43
  import clone from 'lodash/clone';
45
- import { scaleLinear, scaleBand, scalePoint, scaleTime } from 'd3-scale';
46
44
  import toString from 'lodash/toString';
45
+ import { scaleLinear, scalePoint, scaleTime, scaleBand as scaleBand$1 } from 'd3-scale';
47
46
  import indexOf from 'lodash/indexOf';
48
47
  import find from 'lodash/find';
49
48
  import orderBy from 'lodash/orderBy';
50
49
  import unionBy from 'lodash/unionBy';
51
- import { timeMinute, timeDay, timeMonth, timeYear } from 'd3-time';
52
50
  import moment, { duration } from 'moment/moment';
53
51
  import pickBy from 'lodash/pickBy';
54
52
  import { brushX } from 'd3-brush';
@@ -115,11 +113,10 @@ class ChartTooltipDirective {
115
113
  show() {
116
114
  if (this.overlayRef.hasAttached()) {
117
115
  this.positionStrategy.apply();
116
+ return;
118
117
  }
119
- else {
120
- const tooltipRef = this.overlayRef.attach(new ComponentPortal(ChartTooltipComponent));
121
- tooltipRef.instance.template = this.template;
122
- }
118
+ const tooltipRef = this.overlayRef.attach(new ComponentPortal(ChartTooltipComponent));
119
+ tooltipRef.instance.template = this.template;
123
120
  }
124
121
  hide() {
125
122
  this.overlayRef.detach();
@@ -226,10 +223,10 @@ class ChartTooltipsComponent {
226
223
  const directivesChanged = !isEqual(currentTooltipDirectivesIndex, this.tooltipDirectivesIndex);
227
224
  if (this.closePending || directivesChanged || !this.isOpen) {
228
225
  clearTimeout(this.openTimeout);
229
- this.openTimeout = setTimeout(() => {
226
+ this.openTimeout = window.setTimeout(() => {
230
227
  this.openTooltips.next();
231
228
  clearTimeout(this.collisionTimeout);
232
- this.collisionTimeout = setTimeout(() => {
229
+ this.collisionTimeout = window.setTimeout(() => {
233
230
  this.avoidTooltipCollisions();
234
231
  this.isOpen = true;
235
232
  });
@@ -247,7 +244,7 @@ class ChartTooltipsComponent {
247
244
  }
248
245
  this.closePending = true;
249
246
  clearTimeout(this.closeTimeout);
250
- this.closeTimeout = setTimeout(() => {
247
+ this.closeTimeout = window.setTimeout(() => {
251
248
  this.closeTooltips.next();
252
249
  this.closePending = false;
253
250
  this.isOpen = false;
@@ -1923,7 +1920,7 @@ class UtilityService {
1923
1920
  if (haystack.length === 1) {
1924
1921
  return 0;
1925
1922
  }
1926
- else if (haystack.length === 0) {
1923
+ if (haystack.length === 0) {
1927
1924
  return;
1928
1925
  }
1929
1926
  const valueAccessor = UtilityService.getValueAccessor(accessor, haystack[0]);
@@ -2209,7 +2206,6 @@ class BarRenderer extends XYRenderer {
2209
2206
  .merge(bars)
2210
2207
  .property(generatedAttrs, (d, i) => attrsGenerator(d, i)) // This saves attrsGenerator() output to local d3 variable generatedAttrs
2211
2208
  .select("rect")
2212
- // eslint-disable-next-line max-len
2213
2209
  .attr("class", (d, i) => `${BarRenderer.BAR_RECT_CLASS} ${this.config.barClass}${this.config.pointerEvents ? " pointer-events" : ""}` + getCssClass(d, i))
2214
2210
  .style("cursor", (_a = this.config.cursor) !== null && _a !== void 0 ? _a : "")
2215
2211
  .style("stroke-width", (_c = (_b = this.config) === null || _b === void 0 ? void 0 : _b.strokeWidth) !== null && _c !== void 0 ? _c : "")
@@ -3985,7 +3981,7 @@ class Chart {
3985
3981
  build(element) {
3986
3982
  this.element = element;
3987
3983
  // @ts-ignore: Workaround to avoid strict build crash because of type
3988
- this.target = select(this.element)
3984
+ this.target = select$1(this.element)
3989
3985
  .append("svg")
3990
3986
  .attrs({
3991
3987
  class: "nui-chart",
@@ -4231,7 +4227,9 @@ class ChartAssist {
4231
4227
  .pipe(filter$1((event) => event.data.interactionType === InteractionType.MouseMove), map((event) => event.data.dataPoints[chartSeries.id]));
4232
4228
  // if there is no highlightData, or index is "-1", we'll show the last value from series (if possible)
4233
4229
  const highlightDataPresentPredicate = (highlightData) => highlightData && highlightData.index >= 0;
4234
- return seriesHighlight$.pipe(switchMap((highlightData) => highlightDataPresentPredicate(highlightData)
4230
+ return seriesHighlight$.pipe(
4231
+ // eslint-disable-next-line import/no-deprecated
4232
+ switchMap((highlightData) => highlightDataPresentPredicate(highlightData)
4235
4233
  ? of(highlightData.data)
4236
4234
  : of(chartSeries.data && chartSeries.data.length
4237
4235
  ? chartSeries.data[chartSeries.data.length - 1]
@@ -4851,10 +4849,10 @@ function mergeDomains(domains, scale) {
4851
4849
  if (nonEmptyDomains.length === 0) {
4852
4850
  return EMPTY_CONTINUOUS_DOMAIN;
4853
4851
  }
4854
- const domainMin = min(nonEmptyDomains
4852
+ const domainMin = min$1(nonEmptyDomains
4855
4853
  .filter((e) => typeof e[0] !== undefined)
4856
4854
  .map((e) => e[0]));
4857
- const domainMax = max(nonEmptyDomains
4855
+ const domainMax = max$1(nonEmptyDomains
4858
4856
  .filter((e) => typeof e[1] !== undefined)
4859
4857
  .map((e) => e[1]));
4860
4858
  return [domainMin, domainMax];
@@ -5744,7 +5742,7 @@ class Grid {
5744
5742
  if (!this.borders.bottom) {
5745
5743
  throw new Error("BottomBorder is not defined");
5746
5744
  }
5747
- select(this.borders.bottom)
5745
+ select$1(this.borders.bottom)
5748
5746
  .attrs({
5749
5747
  x1: 0,
5750
5748
  y1: this.config().dimension.height() - borderMidpoint,
@@ -5763,7 +5761,7 @@ class Grid {
5763
5761
  this.updateBottomBorder();
5764
5762
  }
5765
5763
  if (this.borders.top) {
5766
- select(this.borders.top)
5764
+ select$1(this.borders.top)
5767
5765
  .attrs({
5768
5766
  x1: 0,
5769
5767
  y1: borderMidpoint,
@@ -5774,7 +5772,7 @@ class Grid {
5774
5772
  .classed("hidden", !((_a = this._config.borders.top) === null || _a === void 0 ? void 0 : _a.visible));
5775
5773
  }
5776
5774
  if (this.borders.right) {
5777
- select(this.borders.right)
5775
+ select$1(this.borders.right)
5778
5776
  .attrs({
5779
5777
  x1: this.config().dimension.width() - borderMidpoint,
5780
5778
  y1: 0,
@@ -5785,7 +5783,7 @@ class Grid {
5785
5783
  .classed("hidden", !((_b = this._config.borders.right) === null || _b === void 0 ? void 0 : _b.visible));
5786
5784
  }
5787
5785
  if (this.borders.left) {
5788
- select(this.borders.left)
5786
+ select$1(this.borders.left)
5789
5787
  .attrs({
5790
5788
  x1: borderMidpoint,
5791
5789
  y1: 0,
@@ -6143,18 +6141,18 @@ class XYGrid extends Grid {
6143
6141
  const textOfTicks = [];
6144
6142
  labelGroup.attr("cursor", "default");
6145
6143
  labelGroup.selectAll("g").each(function () {
6146
- select(this)
6144
+ select$1(this)
6147
6145
  .classed("sw-hidden", false)
6148
6146
  .classed("tick-hidden-text", false);
6149
6147
  textOfTicks.push(this);
6150
6148
  });
6151
6149
  const toRemove = this.filterRepeatedElements(textOfTicks);
6152
6150
  toRemove.forEach((group) => {
6153
- select(group).classed("tick-hidden-text", true);
6151
+ select$1(group).classed("tick-hidden-text", true);
6154
6152
  });
6155
6153
  const allAxisLabels = this.selectAllAxisLabels(labelGroup);
6156
6154
  allAxisLabels.forEach((group) => {
6157
- const groupSelection = select(group);
6155
+ const groupSelection = select$1(group);
6158
6156
  // zero-out the d3-provided x position of all labels since we're manually translating the x position of the entire group;
6159
6157
  // add IGNORE_INTERACTION_CLASS so that mouse events used for displaying the title don't propagate from the mouse-interactive-area
6160
6158
  groupSelection
@@ -6180,7 +6178,7 @@ class XYGrid extends Grid {
6180
6178
  !axisConfig.bottom.tickLabel.overflowHandler)) {
6181
6179
  const textToHide = this.getElementsToHide(axisLabels, this._config.dimension.width(), true);
6182
6180
  textToHide.forEach((group) => {
6183
- const groupSelection = select(group);
6181
+ const groupSelection = select$1(group);
6184
6182
  groupSelection.classed("tick-hidden-text", true);
6185
6183
  // disable pointer-events so the title doesn't display for hidden labels
6186
6184
  groupSelection.classed("pointer-events", false);
@@ -6190,7 +6188,7 @@ class XYGrid extends Grid {
6190
6188
  if (scale.id === this.rightScaleId || scale.id === this.leftScaleId) {
6191
6189
  const textToHide = this.getElementsToHide(axisLabels, this._config.dimension.height(), false);
6192
6190
  textToHide.forEach((group) => {
6193
- select(group).classed("sw-hidden", true);
6191
+ select$1(group).classed("sw-hidden", true);
6194
6192
  });
6195
6193
  }
6196
6194
  const margin = this.config().dimension.margin;
@@ -6292,12 +6290,12 @@ class XYGrid extends Grid {
6292
6290
  // hide the labels and disable pointer-events while debouncing
6293
6291
  labelGroup.classed("tick-hidden-text", true);
6294
6292
  axisLabels.forEach((group) => {
6295
- select(group).classed("pointer-events", false);
6293
+ select$1(group).classed("pointer-events", false);
6296
6294
  });
6297
6295
  // setTimeout used for debounce when the chart is resized
6298
6296
  this.handleTickLabelOverflowDebounceIndex[scale.id] = setTimeout(() => {
6299
6297
  axisLabels.forEach((group) => {
6300
- const groupSelection = select(group);
6298
+ const groupSelection = select$1(group);
6301
6299
  // invoke the handler for each text element
6302
6300
  groupSelection
6303
6301
  .select("text")
@@ -6380,12 +6378,12 @@ class XYGrid extends Grid {
6380
6378
  filterRepeatedElements(elementsToFilter) {
6381
6379
  const arr = [elementsToFilter[0]];
6382
6380
  elementsToFilter.reduce((prev, next) => {
6383
- const textInsideNext = select(next).text();
6381
+ const textInsideNext = select$1(next).text();
6384
6382
  if (textInsideNext !== prev) {
6385
6383
  arr.push(next);
6386
6384
  }
6387
6385
  return textInsideNext;
6388
- }, elementsToFilter[0] && select(elementsToFilter[0]).text());
6386
+ }, elementsToFilter[0] && select$1(elementsToFilter[0]).text());
6389
6387
  return elementsToFilter.filter((element) => arr.indexOf(element) === -1);
6390
6388
  }
6391
6389
  getElementsToHide(elementsToFilter, measurement, isBottomAxis) {
@@ -6726,11 +6724,9 @@ class RadialRenderer extends Renderer {
6726
6724
  if (!(this.config.maxThickness && this.config.annularGrowth)) {
6727
6725
  return this.config.annularWidth;
6728
6726
  }
6729
- else {
6730
- return Math.min((renderSeries.scales.r.range()[1] -
6731
- renderSeries.scales.r.range()[0]) *
6732
- this.config.annularGrowth, this.config.maxThickness);
6733
- }
6727
+ return Math.min((renderSeries.scales.r.range()[1] -
6728
+ renderSeries.scales.r.range()[0]) *
6729
+ this.config.annularGrowth, this.config.maxThickness);
6734
6730
  }
6735
6731
  emitDataPointHighlight(renderSeries, data, i, rendererSubject) {
6736
6732
  const position = this.getDataPointPosition(renderSeries.dataSeries, i, renderSeries.scales);
@@ -7237,7 +7233,7 @@ function stackedPreprocessor(chartSeriesSet, isVisible) {
7237
7233
  }
7238
7234
  const categories = gatherCategories(chartSeriesSet);
7239
7235
  // This is adding metadata to the dataset and filling missing
7240
- const forExtents = chartSeriesSet.reduce((acc, chartSeries) => {
7236
+ chartSeriesSet.reduce((acc, chartSeries) => {
7241
7237
  if (!isUndefined(chartSeries.preprocess) && !chartSeries.preprocess) {
7242
7238
  return acc;
7243
7239
  }
@@ -7974,7 +7970,7 @@ class PointScale extends Scale {
7974
7970
  .map(this._d3Scale)
7975
7971
  .slice(0, -1)
7976
7972
  .map((d) => d + this._d3Scale.step() / 2);
7977
- return domain[bisect(rangeMidPoints, coordinate)];
7973
+ return domain[bisect$1(rangeMidPoints, coordinate)];
7978
7974
  }
7979
7975
  round(round) {
7980
7976
  if (round) {
@@ -8023,19 +8019,29 @@ const formatSecond = (d) => intlFormat(d, {
8023
8019
  hour: "numeric",
8024
8020
  minute: "2-digit",
8025
8021
  second: "2-digit",
8026
- }), formatMinute = (d) => intlFormat(d, { hour: "numeric", minute: "2-digit" }), formatWeek = (d) => intlFormat(d, { month: "short", day: "2-digit" }), formatMonth = (d) => intlFormat(d, { month: "short" }), formatYear = (d) => intlFormat(d, { year: "numeric" });
8022
+ });
8023
+ const formatMinute = (d) => intlFormat(d, { hour: "numeric", minute: "2-digit" });
8024
+ const formatWeek = (d) => intlFormat(d, { month: "short", day: "2-digit" });
8025
+ const formatMonth = (d) => intlFormat(d, { month: "short" });
8026
+ const formatYear = (d) => intlFormat(d, { year: "numeric" });
8027
8027
  /**
8028
8028
  * Formatter for dates
8029
8029
  */
8030
- const datetimeFormatter = (date) => (timeMinute(date) < date
8031
- ? formatSecond
8032
- : timeDay(date) < date
8033
- ? formatMinute
8034
- : timeMonth(date) < date
8035
- ? formatWeek
8036
- : timeYear(date) < date
8037
- ? formatMonth
8038
- : formatYear)(date);
8030
+ const datetimeFormatter = (date) => {
8031
+ if (timeMinute(date) < date) {
8032
+ return formatSecond(date);
8033
+ }
8034
+ if (timeDay(date) < date) {
8035
+ return formatMinute(date);
8036
+ }
8037
+ if (timeMonth(date) < date) {
8038
+ return formatWeek(date);
8039
+ }
8040
+ if (timeYear(date) < date) {
8041
+ return formatMonth(date);
8042
+ }
8043
+ return formatYear(date);
8044
+ };
8039
8045
 
8040
8046
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
8041
8047
  /**
@@ -8099,7 +8105,7 @@ class TimeIntervalScale extends TimeScale {
8099
8105
  return (datetimeFormatter(adjustedDate) + " - " + datetimeFormatter(endDate));
8100
8106
  };
8101
8107
  this.interval(interval);
8102
- this._bandScale = scaleBand();
8108
+ this._bandScale = scaleBand$1();
8103
8109
  this.formatters.title = this.defaultTitleFormatter;
8104
8110
  }
8105
8111
  interval(value) {
@@ -9094,7 +9100,7 @@ class SparkChartAssist {
9094
9100
  * and assign this function to the ngFor trackBy property
9095
9101
  */
9096
9102
  trackByFn(_index, spark) {
9097
- return spark.id;
9103
+ return spark === null || spark === void 0 ? void 0 : spark.id;
9098
9104
  }
9099
9105
  setRenderState(_seriesId, _state) {
9100
9106
  // not used
@@ -9264,7 +9270,7 @@ class BarHighlightStrategy {
9264
9270
  if (typeof value === "string") {
9265
9271
  return findIndex(series.data, (d, i) => value === (startAccessor === null || startAccessor === void 0 ? void 0 : startAccessor(d, i, series.data, series)));
9266
9272
  }
9267
- else if (isArray(value)) {
9273
+ if (isArray(value)) {
9268
9274
  return findIndex(series.data, (d, i) => {
9269
9275
  const start = startAccessor === null || startAccessor === void 0 ? void 0 : startAccessor(d, i, series.data, series);
9270
9276
  const lengthLimit = Math.min(this.levels, value.length, start.length);
@@ -9277,7 +9283,7 @@ class BarHighlightStrategy {
9277
9283
  return true;
9278
9284
  });
9279
9285
  }
9280
- else if (value.valueOf) {
9286
+ if (value.valueOf) {
9281
9287
  const valueOf = value.valueOf();
9282
9288
  if (scales && ((_a = scales[scaleKey]) === null || _a === void 0 ? void 0 : _a.isContinuous())) {
9283
9289
  let index = findIndex(series.data, (d, i) => valueOf >=
@@ -9337,7 +9343,7 @@ class BarHighlightStrategy {
9337
9343
  else {
9338
9344
  renderState = RenderState.deemphasized;
9339
9345
  }
9340
- select(this).attrs(barStylesFn(renderState));
9346
+ select$1(this).attrs(barStylesFn(renderState));
9341
9347
  });
9342
9348
  // rendererSubject.next({
9343
9349
  // eventName: HIGHLIGHT_SERIES_EVENT,
@@ -9709,7 +9715,7 @@ class AreaRenderer extends XYRenderer {
9709
9715
  MarkerUtils.manageMarker(renderSeries.dataSeries, renderSeries.scales, dataPointIndex, container, rendererSubject, this.config.markerInteraction);
9710
9716
  }
9711
9717
  safetyCheck(value) {
9712
- return isNaN(value) || typeof value === "undefined" ? 0 : value;
9718
+ return typeof value === "undefined" || isNaN(value) ? 0 : value;
9713
9719
  }
9714
9720
  }
9715
9721