@sproutsocial/seeds-react-data-viz 0.25.1 → 0.26.1
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.
- package/dist/bar/index.js +10 -10
- package/dist/bubble/index.js +4 -4
- package/dist/charts.css +139 -12
- package/dist/{chunk-2A3KLUIF.js → chunk-BRIU5SPJ.js} +3 -3
- package/dist/{chunk-2A3KLUIF.js.map → chunk-BRIU5SPJ.js.map} +1 -1
- package/dist/{chunk-TNZNBMSZ.js → chunk-NU2RCATK.js} +95 -47
- package/dist/chunk-NU2RCATK.js.map +1 -0
- package/dist/{chunk-CWKFNAXF.js → chunk-PIZ4MT2B.js} +3 -3
- package/dist/{chunk-CWKFNAXF.js.map → chunk-PIZ4MT2B.js.map} +1 -1
- package/dist/donut/index.js +4 -4
- package/dist/esm/bar/index.js +3 -3
- package/dist/esm/bubble/index.js +1 -1
- package/dist/esm/{chunk-AJGRGRI6.js → chunk-GHP4TT7H.js} +2 -2
- package/dist/esm/{chunk-CIG5NERD.js → chunk-OZ7SPMTQ.js} +2 -2
- package/dist/esm/{chunk-V63L6753.js → chunk-XEFCGFCF.js} +69 -21
- package/dist/esm/chunk-XEFCGFCF.js.map +1 -0
- package/dist/esm/donut/index.js +1 -1
- package/dist/esm/line-area/index.js +3 -3
- package/dist/esm/sparkline/index.js +2 -2
- package/dist/esm/wordcloud/index.js +32 -4
- package/dist/esm/wordcloud/index.js.map +1 -1
- package/dist/line-area/index.js +10 -10
- package/dist/sparkline/index.js +6 -6
- package/dist/wordcloud/index.d.mts +8 -1
- package/dist/wordcloud/index.d.ts +8 -1
- package/dist/wordcloud/index.js +40 -12
- package/dist/wordcloud/index.js.map +1 -1
- package/dist/wordcloud.css +138 -11
- package/package.json +1 -1
- package/dist/chunk-TNZNBMSZ.js.map +0 -1
- package/dist/esm/chunk-V63L6753.js.map +0 -1
- /package/dist/esm/{chunk-AJGRGRI6.js.map → chunk-GHP4TT7H.js.map} +0 -0
- /package/dist/esm/{chunk-CIG5NERD.js.map → chunk-OZ7SPMTQ.js.map} +0 -0
|
@@ -132,28 +132,55 @@ function resolvePointOpacity({
|
|
|
132
132
|
const t = normalizeWeight(weight, min, max);
|
|
133
133
|
return rangeMin + t * (rangeMax - rangeMin);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
const
|
|
135
|
+
function allocateWordsAcrossGroups(data, maxWordCount) {
|
|
136
|
+
const buckets = /* @__PURE__ */ new Map();
|
|
137
|
+
for (const point of data) {
|
|
138
|
+
const bucket = buckets.get(point.groupId);
|
|
139
|
+
if (bucket) bucket.push(point);
|
|
140
|
+
else buckets.set(point.groupId, [point]);
|
|
141
|
+
}
|
|
142
|
+
for (const bucket of buckets.values()) {
|
|
143
|
+
bucket.sort((a, b) => b.weight - a.weight);
|
|
144
|
+
}
|
|
145
|
+
const bucketArrays = [...buckets.values()];
|
|
146
|
+
const result = [];
|
|
147
|
+
for (let round = 0; result.length < maxWordCount; round++) {
|
|
148
|
+
let addedThisRound = false;
|
|
149
|
+
for (const bucket of bucketArrays) {
|
|
150
|
+
if (result.length >= maxWordCount) break;
|
|
151
|
+
if (round < bucket.length) {
|
|
152
|
+
result.push(bucket[round]);
|
|
153
|
+
addedThisRound = true;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (!addedThisRound) break;
|
|
157
|
+
}
|
|
158
|
+
return result.sort((a, b) => b.weight - a.weight);
|
|
159
|
+
}
|
|
160
|
+
function transformWordCloudDataToPoints(data, groups, opacityRange, maxWordCount = WORD_CLOUD_MAXIMUM_WORD_COUNT, minFontSize = WORD_CLOUD_MIN_FONT_SIZE, maxFontSize = WORD_CLOUD_MAXIMUM_MAX_FONT_SIZE) {
|
|
137
161
|
const hasGroups = Boolean(groups && groups.length > 0);
|
|
162
|
+
const capped = hasGroups ? allocateWordsAcrossGroups(data, maxWordCount) : [...data].sort((a, b) => b.weight - a.weight).slice(0, maxWordCount);
|
|
138
163
|
const compressedWeights = capped.map((point) => compressWeight(point.weight));
|
|
139
164
|
const min = Math.min(...compressedWeights);
|
|
140
165
|
const max = Math.max(...compressedWeights);
|
|
141
166
|
return capped.map((point, i) => {
|
|
142
167
|
const colorIndex = resolveGroupColorIndex(point.groupId, groups);
|
|
143
|
-
const
|
|
168
|
+
const compressed = compressedWeights[i];
|
|
169
|
+
const t = normalizeWeight(compressed, min, max);
|
|
170
|
+
const weight = minFontSize + t * (maxFontSize - minFontSize);
|
|
144
171
|
return {
|
|
145
172
|
name: point.name,
|
|
146
173
|
weight,
|
|
147
174
|
colorIndex,
|
|
148
175
|
opacity: resolvePointOpacity({
|
|
149
|
-
weight,
|
|
176
|
+
weight: compressed,
|
|
150
177
|
min,
|
|
151
178
|
max,
|
|
152
179
|
hasGroups,
|
|
153
180
|
isEmojiOnly: isEmojiOnlyTerm(point.name),
|
|
154
181
|
opacityRange
|
|
155
182
|
}),
|
|
156
|
-
className: `seeds-wordcloud-word--group-${colorIndex}`,
|
|
183
|
+
className: `seeds-wordcloud-word--group-${colorIndex} seeds-wordcloud-word--index-${i}`,
|
|
157
184
|
custom: { groupId: point.groupId, rawWeight: point.weight }
|
|
158
185
|
};
|
|
159
186
|
});
|
|
@@ -172,13 +199,17 @@ function transformWordCloudClickData(event) {
|
|
|
172
199
|
}
|
|
173
200
|
return { ...base, pageX: _nullishCoalesce(event.pageX, () => ( 0)), pageY: _nullishCoalesce(event.pageY, () => ( 0)) };
|
|
174
201
|
}
|
|
175
|
-
function buildWordCloudOptions(props, containerWidth) {
|
|
202
|
+
function buildWordCloudOptions(props, containerWidth, hasActiveNames = false) {
|
|
176
203
|
const opacityRange = _nullishCoalesce(props.opacityRange, () => ( DEFAULT_OPACITY_RANGE));
|
|
204
|
+
const minFontSize = _nullishCoalesce(props.minFontSize, () => ( WORD_CLOUD_MIN_FONT_SIZE));
|
|
205
|
+
const maxFontSize = _nullishCoalesce(props.maxFontSize, () => ( deriveMaxFontSize(_nullishCoalesce(containerWidth, () => ( 0)))));
|
|
177
206
|
const points = transformWordCloudDataToPoints(
|
|
178
207
|
props.data,
|
|
179
208
|
props.groups,
|
|
180
209
|
opacityRange,
|
|
181
|
-
deriveMaxWordCount(_nullishCoalesce(containerWidth, () => ( 0)))
|
|
210
|
+
deriveMaxWordCount(_nullishCoalesce(containerWidth, () => ( 0))),
|
|
211
|
+
minFontSize,
|
|
212
|
+
maxFontSize
|
|
182
213
|
);
|
|
183
214
|
const base = buildBaseChartOptions({
|
|
184
215
|
type: "wordcloud",
|
|
@@ -215,22 +246,28 @@ function buildWordCloudOptions(props, containerWidth) {
|
|
|
215
246
|
// Hover dim (layer 3). Off by default for column-derived series
|
|
216
247
|
// (wordcloud's base class) — pie is the only series type that
|
|
217
248
|
// defaults this to `true`. Without it, Highcharts never adds
|
|
218
|
-
// `.highcharts-point-inactive` to the other words on hover.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
//
|
|
222
|
-
|
|
223
|
-
//
|
|
224
|
-
//
|
|
225
|
-
|
|
249
|
+
// `.highcharts-point-inactive` to the other words on hover. Turned
|
|
250
|
+
// off entirely once the consumer has opted into `activeNames`-driven
|
|
251
|
+
// emphasis — otherwise Highcharts' own hover pass fights the
|
|
252
|
+
// consumer's `data-active-word-indices` dimming (wordcloud.css).
|
|
253
|
+
inactiveOtherPoints: !hasActiveNames,
|
|
254
|
+
// Resolved above and shared with the transform's font-size mapping.
|
|
255
|
+
// Must stay a number — see `WORD_CLOUD_MAXIMUM_MAX_FONT_SIZE`'s doc
|
|
256
|
+
// comment for why `undefined` breaks sizing.
|
|
257
|
+
minFontSize,
|
|
258
|
+
maxFontSize,
|
|
226
259
|
// Pinned horizontal — Highcharts' default tilts words vertical
|
|
227
260
|
// (`{from: 0, to: 90}`).
|
|
228
261
|
rotation: { from: 0, to: 0, orientations: 1 },
|
|
229
|
-
//
|
|
230
|
-
//
|
|
231
|
-
//
|
|
232
|
-
//
|
|
233
|
-
|
|
262
|
+
// Highcharts' built-in rectangular spiral. It factors the field's
|
|
263
|
+
// aspect ratio in natively (it's built on squareSpiral over the field
|
|
264
|
+
// dimensions), so it fills a wide container and packs denser than the
|
|
265
|
+
// circular `archimedean`. Chosen over the custom `seedsAspectArchimedean`
|
|
266
|
+
// after a visual comparison once the font-size hierarchy fix made word
|
|
267
|
+
// sizes vary enough for the circular spiral's gaps to show. The custom
|
|
268
|
+
// spiral stays registered in chartBase.tsx for now; drop it if
|
|
269
|
+
// rectangular holds up in-app.
|
|
270
|
+
spiral: "rectangular",
|
|
234
271
|
// `seedsWordPadding` (a pure function above, registered onto
|
|
235
272
|
// Highcharts in chartBase.tsx) approximates word spacing, which
|
|
236
273
|
// Highcharts' wordcloud module has no native option for; it reads
|
|
@@ -246,6 +283,17 @@ function buildWordCloudOptions(props, containerWidth) {
|
|
|
246
283
|
_optionalChain([event, 'access', _7 => _7.stopPropagation, 'optionalCall', _8 => _8()]);
|
|
247
284
|
if (event.type !== "click" && !event.target) return;
|
|
248
285
|
props.onClick(transformWordCloudClickData(event));
|
|
286
|
+
} : void 0,
|
|
287
|
+
mouseOver: props.onWordHover ? (event) => {
|
|
288
|
+
const point = event.target;
|
|
289
|
+
if (!point) return;
|
|
290
|
+
props.onWordHover({
|
|
291
|
+
name: point.name,
|
|
292
|
+
groupId: _optionalChain([point, 'access', _9 => _9.custom, 'optionalAccess', _10 => _10.groupId])
|
|
293
|
+
});
|
|
294
|
+
} : void 0,
|
|
295
|
+
mouseOut: props.onWordHover ? () => {
|
|
296
|
+
props.onWordHover(null);
|
|
249
297
|
} : void 0
|
|
250
298
|
}
|
|
251
299
|
}
|
|
@@ -329,7 +377,7 @@ var ChartAnnotationMarkerPortal = _react.memo.call(void 0,
|
|
|
329
377
|
(annotation) => annotation.setAttribute(MARKER_ATTR, "false")
|
|
330
378
|
);
|
|
331
379
|
annotationContext.labels.forEach((label) => {
|
|
332
|
-
const labelElement = _optionalChain([label, 'access',
|
|
380
|
+
const labelElement = _optionalChain([label, 'access', _11 => _11.graphic, 'optionalAccess', _12 => _12.div]);
|
|
333
381
|
if (!labelElement) return;
|
|
334
382
|
let annotationDiv = labelElement.querySelector(
|
|
335
383
|
`div[${MARKER_ATTR}]`
|
|
@@ -339,7 +387,7 @@ var ChartAnnotationMarkerPortal = _react.memo.call(void 0,
|
|
|
339
387
|
labelElement.appendChild(annotationDiv);
|
|
340
388
|
}
|
|
341
389
|
annotationDiv.setAttribute(MARKER_ATTR, "true");
|
|
342
|
-
const xValue = _optionalChain([label, 'access',
|
|
390
|
+
const xValue = _optionalChain([label, 'access', _13 => _13.options, 'optionalAccess', _14 => _14.point, 'optionalAccess', _15 => _15.x]);
|
|
343
391
|
newContainers[xValue] = annotationDiv;
|
|
344
392
|
});
|
|
345
393
|
annotationContainers.current = newContainers;
|
|
@@ -406,9 +454,9 @@ var getDatePartsInTimezone = (date, timezone) => {
|
|
|
406
454
|
});
|
|
407
455
|
const parts = formatter.formatToParts(date);
|
|
408
456
|
return {
|
|
409
|
-
day: parseInt(_nullishCoalesce(_optionalChain([parts, 'access',
|
|
410
|
-
month: parseInt(_nullishCoalesce(_optionalChain([parts, 'access',
|
|
411
|
-
year: parseInt(_nullishCoalesce(_optionalChain([parts, 'access',
|
|
457
|
+
day: parseInt(_nullishCoalesce(_optionalChain([parts, 'access', _16 => _16.find, 'call', _17 => _17((p) => p.type === "day"), 'optionalAccess', _18 => _18.value]), () => ( "0")), 10),
|
|
458
|
+
month: parseInt(_nullishCoalesce(_optionalChain([parts, 'access', _19 => _19.find, 'call', _20 => _20((p) => p.type === "month"), 'optionalAccess', _21 => _21.value]), () => ( "0")), 10),
|
|
459
|
+
year: parseInt(_nullishCoalesce(_optionalChain([parts, 'access', _22 => _22.find, 'call', _23 => _23((p) => p.type === "year"), 'optionalAccess', _24 => _24.value]), () => ( "0")), 10)
|
|
412
460
|
};
|
|
413
461
|
};
|
|
414
462
|
var deriveGranularity = (tickPositions) => {
|
|
@@ -467,20 +515,20 @@ function datetimeFormatter({
|
|
|
467
515
|
switch (granularity) {
|
|
468
516
|
case "hour":
|
|
469
517
|
firstPartOptions = timeFormat === "24" ? { hour: "numeric", minute: "numeric", hour12: false } : { hour: "numeric" };
|
|
470
|
-
if (isFirst || valueParts.day !== _optionalChain([previousValueParts, 'optionalAccess',
|
|
518
|
+
if (isFirst || valueParts.day !== _optionalChain([previousValueParts, 'optionalAccess', _25 => _25.day])) {
|
|
471
519
|
secondPartOptions = { day: "numeric", month: "short" };
|
|
472
520
|
}
|
|
473
521
|
break;
|
|
474
522
|
case "day":
|
|
475
523
|
case "week":
|
|
476
524
|
firstPartOptions = { day: "numeric" };
|
|
477
|
-
if (isFirst || valueParts.month !== _optionalChain([previousValueParts, 'optionalAccess',
|
|
525
|
+
if (isFirst || valueParts.month !== _optionalChain([previousValueParts, 'optionalAccess', _26 => _26.month])) {
|
|
478
526
|
secondPartOptions = { month: "short" };
|
|
479
527
|
}
|
|
480
528
|
break;
|
|
481
529
|
case "month":
|
|
482
530
|
firstPartOptions = { month: "short" };
|
|
483
|
-
if (isFirst || valueParts.year !== _optionalChain([previousValueParts, 'optionalAccess',
|
|
531
|
+
if (isFirst || valueParts.year !== _optionalChain([previousValueParts, 'optionalAccess', _27 => _27.year])) {
|
|
484
532
|
secondPartOptions = { year: "numeric" };
|
|
485
533
|
}
|
|
486
534
|
break;
|
|
@@ -813,7 +861,7 @@ function buildExportChartOptions({
|
|
|
813
861
|
colors,
|
|
814
862
|
exportTitle: rawTitle
|
|
815
863
|
}) {
|
|
816
|
-
const exportTitle = _optionalChain([rawTitle, 'optionalAccess',
|
|
864
|
+
const exportTitle = _optionalChain([rawTitle, 'optionalAccess', _28 => _28.trim, 'call', _29 => _29()]);
|
|
817
865
|
const axisOptions = {
|
|
818
866
|
lineColor: theme.colors.container.border.base,
|
|
819
867
|
gridLineColor: theme.colors.container.border.base,
|
|
@@ -885,7 +933,7 @@ function buildExportChartOptions({
|
|
|
885
933
|
};
|
|
886
934
|
}
|
|
887
935
|
function createChartExportHandle(chart, getExportChartOptions) {
|
|
888
|
-
const resolveName = (filename) => _nullishCoalesce(filename, () => ( defaultFilename(_optionalChain([chart, 'access',
|
|
936
|
+
const resolveName = (filename) => _nullishCoalesce(filename, () => ( defaultFilename(_optionalChain([chart, 'access', _30 => _30.options, 'access', _31 => _31.chart, 'optionalAccess', _32 => _32.type]), /* @__PURE__ */ new Date())));
|
|
889
937
|
const exportImage = async (type, filename) => {
|
|
890
938
|
chart.exportChartLocal(
|
|
891
939
|
{ type, filename: resolveName(filename) },
|
|
@@ -935,7 +983,7 @@ function ChartRenderer({
|
|
|
935
983
|
const exportThemeRef = _react.useRef.call(void 0, { theme, colors, exportTitle });
|
|
936
984
|
exportThemeRef.current = { theme, colors, exportTitle };
|
|
937
985
|
const captureChart = _react.useCallback.call(void 0, (chartInstance) => {
|
|
938
|
-
const forExport = _optionalChain([chartInstance, 'access',
|
|
986
|
+
const forExport = _optionalChain([chartInstance, 'access', _33 => _33.options, 'access', _34 => _34.chart, 'optionalAccess', _35 => _35.forExport]);
|
|
939
987
|
if (!forExport) {
|
|
940
988
|
setChart(chartInstance);
|
|
941
989
|
setPlotHeight(chartInstance.plotHeight);
|
|
@@ -945,7 +993,7 @@ function ChartRenderer({
|
|
|
945
993
|
onReadyRef.current = onReady;
|
|
946
994
|
_react.useEffect.call(void 0, () => {
|
|
947
995
|
if (!chart) return;
|
|
948
|
-
_optionalChain([onReadyRef, 'access',
|
|
996
|
+
_optionalChain([onReadyRef, 'access', _36 => _36.current, 'optionalCall', _37 => _37(
|
|
949
997
|
createChartExportHandle(
|
|
950
998
|
chart,
|
|
951
999
|
() => buildExportChartOptions(exportThemeRef.current)
|
|
@@ -961,18 +1009,18 @@ function ChartRenderer({
|
|
|
961
1009
|
return () => unbind();
|
|
962
1010
|
}, [chart]);
|
|
963
1011
|
const highchartsOptions = _react.useMemo.call(void 0, () => {
|
|
964
|
-
const pointDescriptionFormatter = _optionalChain([options, 'access',
|
|
965
|
-
const svgContainerLabel = _optionalChain([options, 'access',
|
|
966
|
-
const packedBubbleDataLabelFormatter = _optionalChain([options, 'access',
|
|
1012
|
+
const pointDescriptionFormatter = _optionalChain([options, 'access', _38 => _38.accessibility, 'optionalAccess', _39 => _39.point, 'optionalAccess', _40 => _40.descriptionFormatter]);
|
|
1013
|
+
const svgContainerLabel = _optionalChain([options, 'access', _41 => _41.accessibility, 'optionalAccess', _42 => _42.svgContainerLabel]);
|
|
1014
|
+
const packedBubbleDataLabelFormatter = _optionalChain([options, 'access', _43 => _43.plotOptions, 'optionalAccess', _44 => _44.packedbubble, 'optionalAccess', _45 => _45.dataLabels, 'optionalAccess', _46 => _46.formatter]);
|
|
967
1015
|
return {
|
|
968
1016
|
...options,
|
|
969
1017
|
...packedBubbleDataLabelFormatter ? {
|
|
970
1018
|
plotOptions: {
|
|
971
1019
|
...options.plotOptions,
|
|
972
1020
|
packedbubble: {
|
|
973
|
-
..._optionalChain([options, 'access',
|
|
1021
|
+
..._optionalChain([options, 'access', _47 => _47.plotOptions, 'optionalAccess', _48 => _48.packedbubble]),
|
|
974
1022
|
dataLabels: {
|
|
975
|
-
..._optionalChain([options, 'access',
|
|
1023
|
+
..._optionalChain([options, 'access', _49 => _49.plotOptions, 'optionalAccess', _50 => _50.packedbubble, 'optionalAccess', _51 => _51.dataLabels]),
|
|
976
1024
|
formatter() {
|
|
977
1025
|
const bubblePoint = this.point;
|
|
978
1026
|
return packedBubbleDataLabelFormatter.call({
|
|
@@ -982,7 +1030,7 @@ function ChartRenderer({
|
|
|
982
1030
|
index: bubblePoint.index,
|
|
983
1031
|
series: { index: bubblePoint.series.index }
|
|
984
1032
|
},
|
|
985
|
-
radius: _nullishCoalesce(_optionalChain([bubblePoint, 'access',
|
|
1033
|
+
radius: _nullishCoalesce(_optionalChain([bubblePoint, 'access', _52 => _52.marker, 'optionalAccess', _53 => _53.radius]), () => ( 0))
|
|
986
1034
|
});
|
|
987
1035
|
}
|
|
988
1036
|
}
|
|
@@ -990,7 +1038,7 @@ function ChartRenderer({
|
|
|
990
1038
|
}
|
|
991
1039
|
} : {},
|
|
992
1040
|
accessibility: {
|
|
993
|
-
description: _optionalChain([options, 'access',
|
|
1041
|
+
description: _optionalChain([options, 'access', _54 => _54.accessibility, 'optionalAccess', _55 => _55.description]),
|
|
994
1042
|
...pointDescriptionFormatter ? {
|
|
995
1043
|
point: {
|
|
996
1044
|
descriptionFormatter: (point) => {
|
|
@@ -1017,7 +1065,7 @@ function ChartRenderer({
|
|
|
1017
1065
|
}, [options]);
|
|
1018
1066
|
if (series.length === 0) return null;
|
|
1019
1067
|
const chartWithAnnotations = chart;
|
|
1020
|
-
const hasRenderedAnnotations = !!_optionalChain([chartWithAnnotations, 'optionalAccess',
|
|
1068
|
+
const hasRenderedAnnotations = !!_optionalChain([chartWithAnnotations, 'optionalAccess', _56 => _56.annotations, 'optionalAccess', _57 => _57.length]) && !!_optionalChain([annotationLookup, 'optionalAccess', _58 => _58.size]) && plotHeight > 0;
|
|
1021
1069
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1022
1070
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLWDHU4QKjs.GlobalChartStyleOverrides, {}),
|
|
1023
1071
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1043,7 +1091,7 @@ function ChartRenderer({
|
|
|
1043
1091
|
chart,
|
|
1044
1092
|
renderContent: (context) => {
|
|
1045
1093
|
const ctx = context;
|
|
1046
|
-
const isPackedBubble = !ctx.points && _optionalChain([ctx, 'access',
|
|
1094
|
+
const isPackedBubble = !ctx.points && _optionalChain([ctx, 'access', _59 => _59.series, 'optionalAccess', _60 => _60.type]) === "packedbubble";
|
|
1047
1095
|
const isPie = !ctx.points && !isPackedBubble;
|
|
1048
1096
|
const data = isPackedBubble ? (
|
|
1049
1097
|
// Mirrors v1's `transformBubbleChartTooltipData`: color comes from
|
|
@@ -1053,7 +1101,7 @@ function ChartRenderer({
|
|
|
1053
1101
|
color: _nullishCoalesce((ctx.colorIndex !== void 0 ? colors[ctx.colorIndex] : void 0), () => ( "")),
|
|
1054
1102
|
name: _nullishCoalesce(ctx.key, () => ( ctx.point.name)),
|
|
1055
1103
|
value: ctx.point.y,
|
|
1056
|
-
seriesIndex: _optionalChain([ctx, 'access',
|
|
1104
|
+
seriesIndex: _optionalChain([ctx, 'access', _61 => _61.series, 'optionalAccess', _62 => _62.index]),
|
|
1057
1105
|
pointIndex: ctx.point.index
|
|
1058
1106
|
}
|
|
1059
1107
|
]
|
|
@@ -1064,7 +1112,7 @@ function ChartRenderer({
|
|
|
1064
1112
|
value: ctx.point.y,
|
|
1065
1113
|
percent: ctx.point.percentage,
|
|
1066
1114
|
// Icon indexed by the hovered slice — same source the legend reads.
|
|
1067
|
-
icon: _optionalChain([series, 'access',
|
|
1115
|
+
icon: _optionalChain([series, 'access', _63 => _63[ctx.point.index], 'optionalAccess', _64 => _64.icon])
|
|
1068
1116
|
}
|
|
1069
1117
|
] : (
|
|
1070
1118
|
// Drop v1's `readonly` wrapper (v2 is mutable); icon is forwarded
|
|
@@ -1080,12 +1128,12 @@ function ChartRenderer({
|
|
|
1080
1128
|
color: row.color,
|
|
1081
1129
|
name: row.name,
|
|
1082
1130
|
value: row.value,
|
|
1083
|
-
icon: _optionalChain([series, 'access',
|
|
1131
|
+
icon: _optionalChain([series, 'access', _65 => _65[i], 'optionalAccess', _66 => _66.icon])
|
|
1084
1132
|
}))
|
|
1085
1133
|
);
|
|
1086
1134
|
const position = isPie || isPackedBubble ? _nullishCoalesce(ctx.key, () => ( ctx.point.name)) : context.x;
|
|
1087
|
-
const tickPositions = _optionalChain([ctx, 'access',
|
|
1088
|
-
const resolved = _optionalChain([annotationLookup, 'optionalAccess',
|
|
1135
|
+
const tickPositions = _optionalChain([ctx, 'access', _67 => _67.points, 'optionalAccess', _68 => _68[0], 'optionalAccess', _69 => _69.series, 'optionalAccess', _70 => _70.xAxis, 'optionalAccess', _71 => _71.tickPositions]);
|
|
1136
|
+
const resolved = _optionalChain([annotationLookup, 'optionalAccess', _72 => _72.get, 'call', _73 => _73(context.point.x)]);
|
|
1089
1137
|
const annotation = resolved ? {
|
|
1090
1138
|
icon: resolved.icon,
|
|
1091
1139
|
color: resolved.color,
|
|
@@ -1132,4 +1180,4 @@ function ChartRenderer({
|
|
|
1132
1180
|
|
|
1133
1181
|
|
|
1134
1182
|
exports.datetimeFormatter = datetimeFormatter; exports.valueFormatter = valueFormatter; exports.buildBaseChartOptions = buildBaseChartOptions; exports.deriveMaxFontSize = deriveMaxFontSize; exports.deriveMaxWordCount = deriveMaxWordCount; exports.deriveWordPadding = deriveWordPadding; exports.buildWordCloudOptions = buildWordCloudOptions; exports.useSeedsChartSetup = useSeedsChartSetup; exports.ChartRenderer = ChartRenderer;
|
|
1135
|
-
//# sourceMappingURL=chunk-
|
|
1183
|
+
//# sourceMappingURL=chunk-NU2RCATK.js.map
|