@semcore/d3-chart 17.0.0-prerelease.9 → 17.0.0

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 (83) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/lib/cjs/Bubble.js +20 -15
  3. package/lib/cjs/Bubble.js.map +1 -1
  4. package/lib/cjs/a11y/PlotA11yView.js +5 -5
  5. package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
  6. package/lib/cjs/component/Chart/AbstractChart.js +5 -17
  7. package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  8. package/lib/cjs/component/Chart/CigaretteChart.js +197 -57
  9. package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
  10. package/lib/cjs/component/Chart/CigaretteChart.type.js.map +1 -1
  11. package/lib/cjs/style/bubble.shadow.css +4 -0
  12. package/lib/cjs/utils.js +3 -2
  13. package/lib/cjs/utils.js.map +1 -1
  14. package/lib/es6/Bubble.js +20 -15
  15. package/lib/es6/Bubble.js.map +1 -1
  16. package/lib/es6/a11y/PlotA11yView.js +4 -3
  17. package/lib/es6/a11y/PlotA11yView.js.map +1 -1
  18. package/lib/es6/component/Chart/AbstractChart.js +5 -17
  19. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  20. package/lib/es6/component/Chart/CigaretteChart.js +199 -59
  21. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  22. package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
  23. package/lib/es6/style/bubble.shadow.css +4 -0
  24. package/lib/es6/utils.js +3 -2
  25. package/lib/es6/utils.js.map +1 -1
  26. package/lib/esm/AnimatedClipPath.mjs +1 -1
  27. package/lib/esm/Area.mjs +2 -3
  28. package/lib/esm/Axis.mjs +4 -7
  29. package/lib/esm/Bar.mjs +1 -2
  30. package/lib/esm/Bubble.mjs +24 -21
  31. package/lib/esm/CompactHorizontalBar.mjs +4 -4
  32. package/lib/esm/Donut.mjs +5 -4
  33. package/lib/esm/Dots.mjs +1 -2
  34. package/lib/esm/HorizontalBar.mjs +1 -2
  35. package/lib/esm/Hover.mjs +2 -3
  36. package/lib/esm/Line.mjs +2 -3
  37. package/lib/esm/Pattern.mjs +6 -7
  38. package/lib/esm/Plot.mjs +3 -5
  39. package/lib/esm/Radar.mjs +7 -10
  40. package/lib/esm/RadialTree.mjs +17 -63
  41. package/lib/esm/Reference.mjs +0 -1
  42. package/lib/esm/ResponsiveContainer.mjs +3 -5
  43. package/lib/esm/ScatterPlot.mjs +2 -2
  44. package/lib/esm/StackBar.mjs +2 -2
  45. package/lib/esm/StackedArea.mjs +2 -2
  46. package/lib/esm/Tooltip.mjs +5 -8
  47. package/lib/esm/Venn.mjs +3 -3
  48. package/lib/esm/a11y/DataAccessibilityTable.mjs +2 -4
  49. package/lib/esm/a11y/PlotA11yModule.mjs +2 -2
  50. package/lib/esm/a11y/PlotA11yView.mjs +11 -19
  51. package/lib/esm/a11y/focus.mjs +2 -2
  52. package/lib/esm/a11y/hints.mjs +3 -3
  53. package/lib/esm/a11y/insights.mjs +15 -20
  54. package/lib/esm/a11y/intl.mjs +1 -1
  55. package/lib/esm/a11y/locale.mjs +1 -2
  56. package/lib/esm/a11y/serialize.mjs +17 -17
  57. package/lib/esm/component/Chart/AbstractChart.mjs +20 -34
  58. package/lib/esm/component/Chart/AreaChart.mjs +5 -4
  59. package/lib/esm/component/Chart/BarChart.mjs +4 -3
  60. package/lib/esm/component/Chart/BubbleChart.mjs +8 -8
  61. package/lib/esm/component/Chart/CigaretteChart.mjs +204 -64
  62. package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +2 -1
  63. package/lib/esm/component/Chart/DonutChart.mjs +3 -2
  64. package/lib/esm/component/Chart/HistogramChart.mjs +5 -4
  65. package/lib/esm/component/Chart/LineChart.mjs +5 -4
  66. package/lib/esm/component/Chart/RadarChart.mjs +4 -5
  67. package/lib/esm/component/Chart/ScatterPlotChart.mjs +3 -2
  68. package/lib/esm/component/Chart/VennChart.mjs +3 -3
  69. package/lib/esm/component/ChartLegend/BaseLegend.mjs +9 -14
  70. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +1 -2
  71. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +1 -2
  72. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +2 -4
  73. package/lib/esm/component/ChartLegend/index.mjs +2 -0
  74. package/lib/esm/component/Cigarette/Cigarette.mjs +1 -2
  75. package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +2 -3
  76. package/lib/esm/createElement.mjs +1 -1
  77. package/lib/esm/index.mjs +1 -0
  78. package/lib/esm/style/bubble.shadow.css +4 -0
  79. package/lib/esm/utils.mjs +3 -3
  80. package/lib/types/a11y/PlotA11yView.d.ts +1 -1
  81. package/lib/types/component/Chart/AbstractChart.d.ts +4 -7
  82. package/lib/types/component/Chart/CigaretteChart.type.d.ts +7 -4
  83. package/package.json +17 -17
@@ -134,12 +134,12 @@ const serialize = ({
134
134
  if (insights.length === 0) return null;
135
135
  const intl = getIntl(locale, translations, availableLocales);
136
136
  const dataRangeSummary = intl.formatList(dataRange.map((range) => {
137
- const from = (valuesFormatter == null ? void 0 : valuesFormatter(range.from, range.label)) ?? defaultValueFormatter(intl, range.from, {
137
+ const from = valuesFormatter?.(range.from, range.label) ?? defaultValueFormatter(intl, range.from, {
138
138
  siblingsTimeMark: range.to,
139
139
  datesWithTime,
140
140
  maxListSymbols
141
141
  });
142
- const to = (valuesFormatter == null ? void 0 : valuesFormatter(range.to, range.label)) ?? defaultValueFormatter(intl, range.to, {
142
+ const to = valuesFormatter?.(range.to, range.label) ?? defaultValueFormatter(intl, range.to, {
143
143
  siblingsTimeMark: range.from,
144
144
  datesWithTime,
145
145
  maxListSymbols
@@ -149,7 +149,7 @@ const serialize = ({
149
149
  }, {
150
150
  from,
151
151
  to,
152
- label: (titlesFormatter == null ? void 0 : titlesFormatter(range.label)) ?? range.label
152
+ label: titlesFormatter?.(range.label) ?? range.label
153
153
  });
154
154
  }));
155
155
  if (dataType === "time-series") {
@@ -173,12 +173,12 @@ const serialize = ({
173
173
  const mainSummary = intl.formatMessage({
174
174
  id: "time-series-general-trend"
175
175
  }, {
176
- dataKey: (titlesFormatter == null ? void 0 : titlesFormatter(summaryDataKey)) ?? summaryDataKey,
176
+ dataKey: titlesFormatter?.(summaryDataKey) ?? summaryDataKey,
177
177
  trend: intl.formatMessage({
178
178
  id: `trend-${primaryTrend.change.strength}`
179
179
  }),
180
- from: (valuesFormatter == null ? void 0 : valuesFormatter(primaryTrend.change.from, dataKey)) ?? intl.formatNumber(primaryTrend.change.from),
181
- to: (valuesFormatter == null ? void 0 : valuesFormatter(primaryTrend.change.to, dataKey)) ?? intl.formatNumber(primaryTrend.change.to)
180
+ from: valuesFormatter?.(primaryTrend.change.from, dataKey) ?? intl.formatNumber(primaryTrend.change.from),
181
+ to: valuesFormatter?.(primaryTrend.change.to, dataKey) ?? intl.formatNumber(primaryTrend.change.to)
182
182
  });
183
183
  const secondarySummaries = secondaryTrends.map((trend) => intl.formatMessage({
184
184
  id: "time-series-local-trend"
@@ -186,12 +186,12 @@ const serialize = ({
186
186
  trend: intl.formatMessage({
187
187
  id: `trend-${trend.change.strength}`
188
188
  }),
189
- from: (valuesFormatter == null ? void 0 : valuesFormatter(trend.from, trend.dataKey)) ?? defaultValueFormatter(intl, trend.from, {
189
+ from: valuesFormatter?.(trend.from, trend.dataKey) ?? defaultValueFormatter(intl, trend.from, {
190
190
  siblingsTimeMark: trend.to,
191
191
  datesWithTime,
192
192
  maxListSymbols
193
193
  }),
194
- to: (valuesFormatter == null ? void 0 : valuesFormatter(trend.to, trend.dataKey)) ?? defaultValueFormatter(intl, trend.to, {
194
+ to: valuesFormatter?.(trend.to, trend.dataKey) ?? defaultValueFormatter(intl, trend.to, {
195
195
  siblingsTimeMark: trend.from,
196
196
  datesWithTime,
197
197
  maxListSymbols
@@ -212,7 +212,7 @@ const serialize = ({
212
212
  }, {
213
213
  entities,
214
214
  entitiesList: intl.formatList(entitiesList),
215
- label: (titlesFormatter == null ? void 0 : titlesFormatter(dataTitle)) ?? dataTitle
215
+ label: titlesFormatter?.(dataTitle) ?? dataTitle
216
216
  });
217
217
  if (dataRangeSummary.length > 0) {
218
218
  return `${summary}
@@ -237,7 +237,7 @@ ${dataRangeSummary}`;
237
237
  minSize
238
238
  });
239
239
  const entitiesList = biggestClusters.map((clusterInsight) => {
240
- const labels = formatLimitedSizeList(clusterInsight.labels.map((label) => (titlesFormatter == null ? void 0 : titlesFormatter(label)) ?? label), intl, maxListSymbols);
240
+ const labels = formatLimitedSizeList(clusterInsight.labels.map((label) => titlesFormatter?.(label) ?? label), intl, maxListSymbols);
241
241
  const anonymous = clusterInsight.labels.length === 0 || labels === String(clusterInsight.size);
242
242
  return intl.formatMessage({
243
243
  id: anonymous ? "entity-type-clusters-label-anonymous" : "entity-type-clusters-label"
@@ -247,10 +247,10 @@ ${dataRangeSummary}`;
247
247
  }),
248
248
  labels,
249
249
  size: clusterInsight.size,
250
- x: (valuesFormatter == null ? void 0 : valuesFormatter(clusterInsight.center.x, clusterInsight.labels)) ?? intl.formatNumber(clusterInsight.center.x),
251
- xLabel: (titlesFormatter == null ? void 0 : titlesFormatter(clusterInsight.center.xLabel)) ?? clusterInsight.center.xLabel,
252
- y: (valuesFormatter == null ? void 0 : valuesFormatter(clusterInsight.center.y, clusterInsight.labels)) ?? intl.formatNumber(clusterInsight.center.y),
253
- yLabel: (titlesFormatter == null ? void 0 : titlesFormatter(clusterInsight.center.yLabel)) ?? clusterInsight.center.yLabel
250
+ x: valuesFormatter?.(clusterInsight.center.x, clusterInsight.labels) ?? intl.formatNumber(clusterInsight.center.x),
251
+ xLabel: titlesFormatter?.(clusterInsight.center.xLabel) ?? clusterInsight.center.xLabel,
252
+ y: valuesFormatter?.(clusterInsight.center.y, clusterInsight.labels) ?? intl.formatNumber(clusterInsight.center.y),
253
+ yLabel: titlesFormatter?.(clusterInsight.center.yLabel) ?? clusterInsight.center.yLabel
254
254
  });
255
255
  });
256
256
  if (insights.length > clustersLimit) {
@@ -265,7 +265,7 @@ ${dataRangeSummary}`;
265
265
  }, {
266
266
  entities,
267
267
  entitiesList: intl.formatList(entitiesList),
268
- label: (titlesFormatter == null ? void 0 : titlesFormatter(dataTitle)) ?? dataTitle
268
+ label: titlesFormatter?.(dataTitle) ?? dataTitle
269
269
  });
270
270
  if (dataRangeSummary.length > 0) {
271
271
  return `${summary}
@@ -290,7 +290,7 @@ ${dataRangeSummary}`;
290
290
  }, {
291
291
  entities,
292
292
  entitiesList,
293
- label: (titlesFormatter == null ? void 0 : titlesFormatter(dataTitle)) ?? dataTitle
293
+ label: titlesFormatter?.(dataTitle) ?? dataTitle
294
294
  });
295
295
  } else if (dataType === "grouped-values" || dataType === "indexed-groups") {
296
296
  const groupInsights = insights;
@@ -338,7 +338,7 @@ ${dataRangeSummary}`;
338
338
  }, {
339
339
  entities,
340
340
  entitiesList: intl.formatList(entitiesList),
341
- label: (titlesFormatter == null ? void 0 : titlesFormatter(dataTitle)) ?? dataTitle
341
+ label: titlesFormatter?.(dataTitle) ?? dataTitle
342
342
  });
343
343
  return summary;
344
344
  }
@@ -1,17 +1,18 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- import { Component, sstyled, assignProps } from "@semcore/core";
3
- import { Flex, Box } from "@semcore/base-components";
2
+ import { sstyled, Component, assignProps } from "@semcore/core";
3
+ import { Box, Flex } from "@semcore/base-components";
4
4
  import { extractAriaProps } from "@semcore/core/lib/utils/ariaProps";
5
5
  import { callAllEventHandlers } from "@semcore/core/lib/utils/assignProps";
6
6
  import { Text } from "@semcore/typography";
7
7
  import React, { Fragment } from "react";
8
- import Plot from "../../Plot.mjs";
9
- import { LegendFlex } from "../ChartLegend/LegendFlex/LegendFlex.mjs";
8
+ import "../../index.mjs";
9
+ import { makeDataHintsContainer } from "../../a11y/hints.mjs";
10
+ import { interpolateValue } from "../../utils.mjs";
11
+ import "../ChartLegend/index.mjs";
10
12
  import { LegendTable } from "../ChartLegend/LegendTable/LegendTable.mjs";
13
+ import { LegendFlex } from "../ChartLegend/LegendFlex/LegendFlex.mjs";
11
14
  import { YAxis, XAxis } from "../../Axis.mjs";
12
- import { interpolateValue } from "../../utils.mjs";
13
- import { makeDataHintsContainer } from "../../a11y/hints.mjs";
14
- /*!__reshadow-styles__:"../../style/abstract-chart.shadow.css"*/
15
+ import Plot from "../../Plot.mjs";
15
16
  const style = (
16
17
  /*__reshadow_css_start__*/
17
18
  (sstyled.insert(
@@ -32,11 +33,6 @@ class AbstractChart extends Component {
32
33
  super(props);
33
34
  _defineProperty(this, "plotPadding", 6);
34
35
  _defineProperty(this, "dataHints", makeDataHintsContainer());
35
- _defineProperty(this, "state", {
36
- dataDefinitions: this.getDefaultDataDefinitions(),
37
- highlightedLine: -1,
38
- withTrend: false
39
- });
40
36
  this.setHighlightedLine = this.setHighlightedLine.bind(this);
41
37
  this.handleChangeVisible = this.handleChangeVisible.bind(this);
42
38
  this.handleMouseEnter = this.handleMouseEnter.bind(this);
@@ -44,6 +40,11 @@ class AbstractChart extends Component {
44
40
  this.resolveColor = this.resolveColor.bind(this);
45
41
  this.tooltipValueFormatter = this.tooltipValueFormatter.bind(this);
46
42
  this.handleWithTrendChange = this.handleWithTrendChange.bind(this);
43
+ this.state = {
44
+ dataDefinitions: this.getDefaultDataDefinitions(),
45
+ highlightedLine: -1,
46
+ withTrend: false
47
+ };
47
48
  }
48
49
  componentDidUpdate(prevProps) {
49
50
  if (prevProps.data !== this.props.data || prevProps.legendProps !== this.props.legendProps) {
@@ -58,17 +59,16 @@ class AbstractChart extends Component {
58
59
  legendProps
59
60
  } = this.props;
60
61
  return this.dataKeys.map((key, index) => {
61
- var _a;
62
- const legendData = (_a = legendProps == null ? void 0 : legendProps.legendMap) == null ? void 0 : _a[key];
62
+ const legendData = legendProps?.legendMap?.[key];
63
63
  const dataDefinition = {
64
64
  id: key,
65
- label: (legendData == null ? void 0 : legendData.label) ?? key,
66
- icon: (legendData == null ? void 0 : legendData.icon) ?? void 0,
67
- checked: (legendData == null ? void 0 : legendData.defaultChecked) ?? true,
65
+ label: legendData?.label ?? key,
66
+ icon: legendData?.icon ?? void 0,
67
+ checked: legendData?.defaultChecked ?? true,
68
68
  color: this.resolveColor(key, index),
69
69
  columns: []
70
70
  };
71
- if ((legendData == null ? void 0 : legendData.additionalInfo) || (legendData == null ? void 0 : legendData.count)) {
71
+ if (legendData?.additionalInfo || legendData?.count) {
72
72
  dataDefinition.additionalInfo = legendData.additionalInfo ? {
73
73
  label: legendData.additionalInfo
74
74
  } : legendData.count ? {
@@ -233,18 +233,6 @@ class AbstractChart extends Component {
233
233
  }
234
234
  return total;
235
235
  }
236
- percentValue(data, key) {
237
- const total = this.totalValue(data);
238
- const value = data[key];
239
- if (typeof value === "number" && total !== 0) {
240
- const percent = Math.round(100 * value / total);
241
- return `${percent}%`;
242
- }
243
- if (value === null) {
244
- return `0%`;
245
- }
246
- return NOT_A_VALUE;
247
- }
248
236
  getValueScale(values) {
249
237
  const max = Math.max(...values);
250
238
  const min = Math.min(...values);
@@ -283,8 +271,7 @@ class AbstractChart extends Component {
283
271
  this.setHighlightedLine(-1);
284
272
  }
285
273
  resolveColor(id, index) {
286
- var _a;
287
- return ((_a = this.props.colorMap) == null ? void 0 : _a[id]) ?? `chart-palette-order-${index + 1}`;
274
+ return this.props.colorMap?.[id] ?? `chart-palette-order-${index + 1}`;
288
275
  }
289
276
  tooltipValueFormatter(value) {
290
277
  const {
@@ -402,7 +389,6 @@ class AbstractChart extends Component {
402
389
  }) : /* @__PURE__ */ React.createElement(XAxis.Grid, null))));
403
390
  }
404
391
  getTooltipChildren(options) {
405
- var _a;
406
392
  var _ref = this.asProps, _ref3;
407
393
  const STooltipChildrenWrapper = Box;
408
394
  const {
@@ -416,7 +402,7 @@ class AbstractChart extends Component {
416
402
  const {
417
403
  dataDefinitions
418
404
  } = this.state;
419
- const title = (_a = dataItem[groupKey]) == null ? void 0 : _a.toString();
405
+ const title = dataItem[groupKey]?.toString();
420
406
  return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(Flex, _ref3.cn("Flex", {
421
407
  "direction": "column"
422
408
  }), title && /* @__PURE__ */ React.createElement(Tooltip.Title, null, title), /* @__PURE__ */ React.createElement(STooltipChildrenWrapper, _ref3.cn("STooltipChildrenWrapper", {
@@ -3,12 +3,13 @@ import { createComponent } from "@semcore/core";
3
3
  import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
4
4
  import { scaleTime, scaleLinear } from "d3-scale";
5
5
  import React from "react";
6
- import Area from "../../Area.mjs";
7
- import StackedArea from "../../StackedArea.mjs";
8
- import { HoverLine } from "../../Hover.mjs";
9
- import { minMax } from "../../utils.mjs";
6
+ import "../../index.mjs";
10
7
  import { AbstractChart } from "./AbstractChart.mjs";
11
8
  import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
9
+ import { minMax } from "../../utils.mjs";
10
+ import StackedArea from "../../StackedArea.mjs";
11
+ import Area from "../../Area.mjs";
12
+ import { HoverLine } from "../../Hover.mjs";
12
13
  class AreaChartComponent extends AbstractChart {
13
14
  get xScale() {
14
15
  const {
@@ -5,13 +5,14 @@ import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
5
5
  import { scaleTime, scaleBand, scaleLinear } from "d3-scale";
6
6
  import React from "react";
7
7
  import { AbstractChart } from "./AbstractChart.mjs";
8
- import { YAxis, XAxis } from "../../Axis.mjs";
8
+ import "../../index.mjs";
9
+ import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
9
10
  import Line from "../../Line.mjs";
10
11
  import GroupBar from "../../GroupBar.mjs";
11
12
  import StackBar from "../../StackBar.mjs";
12
13
  import { HoverRect } from "../../Hover.mjs";
14
+ import { YAxis, XAxis } from "../../Axis.mjs";
13
15
  import { minMax } from "../../utils.mjs";
14
- import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
15
16
  class BarChartComponent extends AbstractChart {
16
17
  constructor(...args) {
17
18
  super(...args);
@@ -61,7 +62,7 @@ class BarChartComponent extends AbstractChart {
61
62
  const {
62
63
  withTrend
63
64
  } = this.state;
64
- const trendItem = trend == null ? void 0 : trend[key];
65
+ const trendItem = trend?.[key];
65
66
  if (withTrend && trendItem) {
66
67
  return /* @__PURE__ */ React.createElement(Line, {
67
68
  data: trendItem,
@@ -4,10 +4,11 @@ import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
4
4
  import { Text } from "@semcore/typography";
5
5
  import { scaleLinear } from "d3-scale";
6
6
  import React from "react";
7
- import Bubble from "../../Bubble.mjs";
8
- import { calculateBubbleDomain } from "../../utils.mjs";
7
+ import "../../index.mjs";
9
8
  import { AbstractChart } from "./AbstractChart.mjs";
10
9
  import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
10
+ import { calculateBubbleDomain } from "../../utils.mjs";
11
+ import Bubble from "../../Bubble.mjs";
11
12
  class BubbleChartComponent extends AbstractChart {
12
13
  get dataKeys() {
13
14
  const {
@@ -21,21 +22,20 @@ class BubbleChartComponent extends AbstractChart {
21
22
  data
22
23
  } = this.props;
23
24
  return data.map((item, index) => {
24
- var _a;
25
25
  const key = index.toString();
26
- const legendData = (_a = legendProps == null ? void 0 : legendProps.legendMap) == null ? void 0 : _a[key];
26
+ const legendData = legendProps?.legendMap?.[key];
27
27
  if (item.color === void 0) {
28
28
  item.color = this.resolveColor(key, index);
29
29
  }
30
30
  const dataDefinition = {
31
31
  id: key,
32
- label: (legendData == null ? void 0 : legendData.label) ?? item.label ?? key,
33
- icon: (legendData == null ? void 0 : legendData.icon) ?? void 0,
34
- checked: (legendData == null ? void 0 : legendData.defaultChecked) ?? true,
32
+ label: legendData?.label ?? item.label ?? key,
33
+ icon: legendData?.icon ?? void 0,
34
+ checked: legendData?.defaultChecked ?? true,
35
35
  color: item.color,
36
36
  columns: []
37
37
  };
38
- if ((legendData == null ? void 0 : legendData.additionalInfo) || (legendData == null ? void 0 : legendData.count)) {
38
+ if (legendData?.additionalInfo || legendData?.count) {
39
39
  dataDefinition.additionalInfo = legendData.additionalInfo ? {
40
40
  label: legendData.additionalInfo
41
41
  } : legendData.count ? {