@sproutsocial/seeds-react-data-viz 0.26.0 → 0.27.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.
- package/dist/{axis-BWvZqdQr.d.ts → axis-DQXvjzBs.d.ts} +1 -1
- package/dist/{axis-3XKa6pW7.d.mts → axis-DVx6Mn1k.d.mts} +1 -1
- package/dist/bar/index.d.mts +2 -2
- package/dist/bar/index.d.ts +2 -2
- package/dist/bar/index.js +12 -12
- package/dist/bubble/index.d.mts +1 -1
- package/dist/bubble/index.d.ts +1 -1
- package/dist/bubble/index.js +9 -9
- package/dist/chart-styles.css +41 -0
- package/dist/{chartBase-BM97OBBE.d.ts → chartBase-BYipK7MZ.d.ts} +5 -1
- package/dist/{chartBase-D6WI2icR.d.mts → chartBase-Cd405GIA.d.mts} +5 -1
- package/dist/charts.css +41 -0
- package/dist/{chunk-LWDHU4QK.js → chunk-34OKRQET.js} +8 -49
- package/dist/chunk-34OKRQET.js.map +1 -0
- package/dist/{chunk-POMPBGZR.js → chunk-5TWNMPQU.js} +118 -46
- package/dist/chunk-5TWNMPQU.js.map +1 -0
- package/dist/{chunk-XUAHFLZQ.js → chunk-CV45MD47.js} +3 -3
- package/dist/{chunk-XUAHFLZQ.js.map → chunk-CV45MD47.js.map} +1 -1
- package/dist/{chunk-RHGKZW6Y.js → chunk-WMKO3RGT.js} +3 -3
- package/dist/{chunk-RHGKZW6Y.js.map → chunk-WMKO3RGT.js.map} +1 -1
- package/dist/donut/index.d.mts +1 -1
- package/dist/donut/index.d.ts +1 -1
- package/dist/donut/index.js +6 -6
- package/dist/esm/bar/index.js +4 -4
- package/dist/esm/bubble/index.js +2 -2
- package/dist/esm/{chunk-VCTZWYEM.js → chunk-332X77M5.js} +11 -52
- package/dist/esm/chunk-332X77M5.js.map +1 -0
- package/dist/esm/{chunk-QBFXLKBO.js → chunk-AL3OTBTT.js} +2 -2
- package/dist/esm/{chunk-4IWPHCZ4.js → chunk-CYCKJ5ML.js} +105 -33
- package/dist/esm/chunk-CYCKJ5ML.js.map +1 -0
- package/dist/esm/{chunk-SM2B52UR.js → chunk-MVNO5UV6.js} +2 -2
- package/dist/esm/donut/index.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/line-area/index.js +4 -4
- package/dist/esm/sparkline/index.js +3 -3
- package/dist/esm/wordcloud/index.js +2 -2
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +53 -53
- package/dist/line-area/index.d.mts +2 -2
- package/dist/line-area/index.d.ts +2 -2
- package/dist/line-area/index.js +12 -12
- package/dist/sparkline/index.d.mts +3 -3
- package/dist/sparkline/index.d.ts +3 -3
- package/dist/sparkline/index.js +7 -7
- package/dist/wordcloud/index.js +8 -8
- package/package.json +1 -1
- package/dist/chunk-LWDHU4QK.js.map +0 -1
- package/dist/chunk-POMPBGZR.js.map +0 -1
- package/dist/esm/chunk-4IWPHCZ4.js.map +0 -1
- package/dist/esm/chunk-VCTZWYEM.js.map +0 -1
- /package/dist/esm/{chunk-QBFXLKBO.js.map → chunk-AL3OTBTT.js.map} +0 -0
- /package/dist/esm/{chunk-SM2B52UR.js.map → chunk-MVNO5UV6.js.map} +0 -0
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunk34OKRQETjs = require('./chunk-34OKRQET.js');
|
|
14
14
|
|
|
15
15
|
// src/charts/shared/baseChartOptions.ts
|
|
16
16
|
function buildBaseChartOptions({
|
|
@@ -157,7 +157,7 @@ function allocateWordsAcrossGroups(data, maxWordCount) {
|
|
|
157
157
|
}
|
|
158
158
|
return result.sort((a, b) => b.weight - a.weight);
|
|
159
159
|
}
|
|
160
|
-
function transformWordCloudDataToPoints(data, groups, opacityRange, maxWordCount = WORD_CLOUD_MAXIMUM_WORD_COUNT) {
|
|
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) {
|
|
161
161
|
const hasGroups = Boolean(groups && groups.length > 0);
|
|
162
162
|
const capped = hasGroups ? allocateWordsAcrossGroups(data, maxWordCount) : [...data].sort((a, b) => b.weight - a.weight).slice(0, maxWordCount);
|
|
163
163
|
const compressedWeights = capped.map((point) => compressWeight(point.weight));
|
|
@@ -165,13 +165,15 @@ function transformWordCloudDataToPoints(data, groups, opacityRange, maxWordCount
|
|
|
165
165
|
const max = Math.max(...compressedWeights);
|
|
166
166
|
return capped.map((point, i) => {
|
|
167
167
|
const colorIndex = resolveGroupColorIndex(point.groupId, groups);
|
|
168
|
-
const
|
|
168
|
+
const compressed = compressedWeights[i];
|
|
169
|
+
const t = normalizeWeight(compressed, min, max);
|
|
170
|
+
const weight = minFontSize + t * (maxFontSize - minFontSize);
|
|
169
171
|
return {
|
|
170
172
|
name: point.name,
|
|
171
173
|
weight,
|
|
172
174
|
colorIndex,
|
|
173
175
|
opacity: resolvePointOpacity({
|
|
174
|
-
weight,
|
|
176
|
+
weight: compressed,
|
|
175
177
|
min,
|
|
176
178
|
max,
|
|
177
179
|
hasGroups,
|
|
@@ -199,11 +201,15 @@ function transformWordCloudClickData(event) {
|
|
|
199
201
|
}
|
|
200
202
|
function buildWordCloudOptions(props, containerWidth, hasActiveNames = false) {
|
|
201
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)))));
|
|
202
206
|
const points = transformWordCloudDataToPoints(
|
|
203
207
|
props.data,
|
|
204
208
|
props.groups,
|
|
205
209
|
opacityRange,
|
|
206
|
-
deriveMaxWordCount(_nullishCoalesce(containerWidth, () => ( 0)))
|
|
210
|
+
deriveMaxWordCount(_nullishCoalesce(containerWidth, () => ( 0))),
|
|
211
|
+
minFontSize,
|
|
212
|
+
maxFontSize
|
|
207
213
|
);
|
|
208
214
|
const base = buildBaseChartOptions({
|
|
209
215
|
type: "wordcloud",
|
|
@@ -214,7 +220,7 @@ function buildWordCloudOptions(props, containerWidth, hasActiveNames = false) {
|
|
|
214
220
|
chart: {
|
|
215
221
|
...base.chart,
|
|
216
222
|
type: "wordcloud",
|
|
217
|
-
height: _nullishCoalesce(props.height, () => (
|
|
223
|
+
height: _nullishCoalesce(props.height, () => ( _chunk34OKRQETjs.WORD_CLOUD_CHART_HEIGHT))
|
|
218
224
|
},
|
|
219
225
|
// `ChartRenderer`'s default-tooltip routing only recognizes "pie" and
|
|
220
226
|
// "packedbubble" as single-point (non-cartesian) series types
|
|
@@ -245,20 +251,26 @@ function buildWordCloudOptions(props, containerWidth, hasActiveNames = false) {
|
|
|
245
251
|
// emphasis — otherwise Highcharts' own hover pass fights the
|
|
246
252
|
// consumer's `data-active-word-indices` dimming (wordcloud.css).
|
|
247
253
|
inactiveOtherPoints: !hasActiveNames,
|
|
248
|
-
|
|
249
|
-
//
|
|
250
|
-
//
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
maxFontSize: _nullishCoalesce(props.maxFontSize, () => ( deriveMaxFontSize(_nullishCoalesce(containerWidth, () => ( 0))))),
|
|
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,
|
|
254
259
|
// Pinned horizontal — Highcharts' default tilts words vertical
|
|
255
260
|
// (`{from: 0, to: 90}`).
|
|
256
261
|
rotation: { from: 0, to: 0, orientations: 1 },
|
|
257
|
-
//
|
|
258
|
-
//
|
|
259
|
-
//
|
|
260
|
-
//
|
|
261
|
-
|
|
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",
|
|
271
|
+
// Highcharts' wordcloud module defaults `style.fontWeight` to `"900"`
|
|
272
|
+
// (heavy bold) — overridden to normal weight.
|
|
273
|
+
style: { fontWeight: "normal" },
|
|
262
274
|
// `seedsWordPadding` (a pure function above, registered onto
|
|
263
275
|
// Highcharts in chartBase.tsx) approximates word spacing, which
|
|
264
276
|
// Highcharts' wordcloud module has no native option for; it reads
|
|
@@ -664,11 +676,11 @@ function AnnotationHeader({
|
|
|
664
676
|
const hasIconOrTitle = Boolean(icon || title);
|
|
665
677
|
if (!hasIconOrTitle && !description) return null;
|
|
666
678
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
667
|
-
hasIconOrTitle ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
679
|
+
hasIconOrTitle ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.ChartTooltipHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
|
|
668
680
|
icon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: icon, size: "mini", color: "icon.base" }) : null,
|
|
669
681
|
title ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.body", fontSize: 200, children: title }) : null
|
|
670
682
|
] }) }) : null,
|
|
671
|
-
description ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
683
|
+
description ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.ChartTooltipHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { fontSize: 200, color: "text.subtext", children: description }) }) : null
|
|
672
684
|
] });
|
|
673
685
|
}
|
|
674
686
|
function DefaultChartTooltip({
|
|
@@ -686,18 +698,42 @@ function DefaultChartTooltip({
|
|
|
686
698
|
hideTitle,
|
|
687
699
|
hideTotal = false
|
|
688
700
|
}) {
|
|
701
|
+
const usePercentColumn = data.filter((d) => d.percent != null && !isNaN(d.percent)).length > 1;
|
|
689
702
|
const rows = data.map((d) => {
|
|
690
703
|
const formattedValue = d.value == null ? _nullishCoalesce(invalidNumberLabel, () => ( "\u2014")) : valueFormatter({ ...valueFormat, value: d.value, abbreviate: false });
|
|
691
704
|
const nameCell = {
|
|
692
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
705
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.ChartLegendLabel, { color: d.color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartLabelWithIcon, { icon: d.icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${d.name}: `, children: d.name }) }) })
|
|
693
706
|
};
|
|
707
|
+
const percent = d.percent;
|
|
708
|
+
if (usePercentColumn) {
|
|
709
|
+
return {
|
|
710
|
+
cells: [
|
|
711
|
+
nameCell,
|
|
712
|
+
{
|
|
713
|
+
content: percent != null && !isNaN(percent) ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreacttext.Text, { children: [
|
|
714
|
+
Math.round(percent),
|
|
715
|
+
"%"
|
|
716
|
+
] }) : null,
|
|
717
|
+
align: "right",
|
|
718
|
+
pr: 350,
|
|
719
|
+
style: { width: "1%", whiteSpace: "nowrap" }
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { children: formattedValue }),
|
|
723
|
+
align: "right",
|
|
724
|
+
pl: 0,
|
|
725
|
+
style: { width: "1%", whiteSpace: "nowrap" }
|
|
726
|
+
}
|
|
727
|
+
]
|
|
728
|
+
};
|
|
729
|
+
}
|
|
694
730
|
return {
|
|
695
731
|
cells: [
|
|
696
732
|
nameCell,
|
|
697
733
|
{
|
|
698
|
-
content:
|
|
734
|
+
content: percent != null && !isNaN(percent) ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "inline-flex", alignItems: "center", gap: 350, children: [
|
|
699
735
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreacttext.Text, { children: [
|
|
700
|
-
Math.round(
|
|
736
|
+
Math.round(percent),
|
|
701
737
|
"%"
|
|
702
738
|
] }),
|
|
703
739
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { fontWeight: "semibold", children: formattedValue })
|
|
@@ -714,6 +750,10 @@ function DefaultChartTooltip({
|
|
|
714
750
|
isAppendedRow: true,
|
|
715
751
|
cells: [
|
|
716
752
|
{
|
|
753
|
+
// In column mode the Total has no percent, so span the label
|
|
754
|
+
// across the name + percent columns; the value then lands in
|
|
755
|
+
// the value column (col 3) without an empty <td>.
|
|
756
|
+
colSpan: usePercentColumn ? 2 : 1,
|
|
717
757
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { fontWeight: "semibold", "aria-label": "Total: ", children: "Total" })
|
|
718
758
|
},
|
|
719
759
|
{
|
|
@@ -723,12 +763,25 @@ function DefaultChartTooltip({
|
|
|
723
763
|
value: total,
|
|
724
764
|
abbreviate: false
|
|
725
765
|
}) }),
|
|
726
|
-
align: "right"
|
|
766
|
+
align: "right",
|
|
767
|
+
// Only collapse to content width in percent-column mode, matching
|
|
768
|
+
// the per-series value cells above (which are gated the same way).
|
|
769
|
+
// In non-percent multi-series mode the Total stays a plain
|
|
770
|
+
// right-aligned cell so regular stacking is untouched (ticket
|
|
771
|
+
// scope) and the Total matches the series value cells stacked
|
|
772
|
+
// above it.
|
|
773
|
+
...usePercentColumn ? {
|
|
774
|
+
pl: 0,
|
|
775
|
+
style: {
|
|
776
|
+
width: "1%",
|
|
777
|
+
whiteSpace: "nowrap"
|
|
778
|
+
}
|
|
779
|
+
} : {}
|
|
727
780
|
}
|
|
728
781
|
]
|
|
729
782
|
}
|
|
730
783
|
] : [];
|
|
731
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
784
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk34OKRQETjs.ChartTooltip, { children: [
|
|
732
785
|
annotation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
733
786
|
AnnotationHeader,
|
|
734
787
|
{
|
|
@@ -737,7 +790,7 @@ function DefaultChartTooltip({
|
|
|
737
790
|
description: annotation.description
|
|
738
791
|
}
|
|
739
792
|
) : null,
|
|
740
|
-
hideTitle ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
793
|
+
hideTitle ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.ChartTooltipTitle, { children: formatTitle({
|
|
741
794
|
position,
|
|
742
795
|
timezone,
|
|
743
796
|
timeFormat,
|
|
@@ -745,12 +798,12 @@ function DefaultChartTooltip({
|
|
|
745
798
|
textLocale
|
|
746
799
|
}) }),
|
|
747
800
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
748
|
-
|
|
801
|
+
_chunk34OKRQETjs.ChartTooltipTable,
|
|
749
802
|
{
|
|
750
803
|
rows: [...rows, ...totalRow]
|
|
751
804
|
}
|
|
752
805
|
),
|
|
753
|
-
hasOnClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
806
|
+
hasOnClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
|
|
754
807
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
|
|
755
808
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
|
|
756
809
|
] }) : tooltipClickLabel }) : null
|
|
@@ -768,9 +821,18 @@ var SeriesLegend = _react.memo.call(void 0, function SeriesLegend2({
|
|
|
768
821
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartLabelWithIcon, { icon: item.icon, children: item.name }),
|
|
769
822
|
color: item.color
|
|
770
823
|
}));
|
|
771
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
824
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.ChartLegend, { legendLabels: labels });
|
|
772
825
|
});
|
|
773
826
|
|
|
827
|
+
// src/charts/shared/stacking.ts
|
|
828
|
+
function isChartPercentStacked(options) {
|
|
829
|
+
const plotOptions = options.plotOptions;
|
|
830
|
+
if (!plotOptions) return false;
|
|
831
|
+
return Object.values(plotOptions).some(
|
|
832
|
+
(slot) => slot != null && typeof slot === "object" && slot.stacking === "percent"
|
|
833
|
+
);
|
|
834
|
+
}
|
|
835
|
+
|
|
774
836
|
// src/charts/shared/chartExport.ts
|
|
775
837
|
function defaultFilename(type, now) {
|
|
776
838
|
const iso = now.toISOString();
|
|
@@ -1058,7 +1120,7 @@ function ChartRenderer({
|
|
|
1058
1120
|
const chartWithAnnotations = chart;
|
|
1059
1121
|
const hasRenderedAnnotations = !!_optionalChain([chartWithAnnotations, 'optionalAccess', _56 => _56.annotations, 'optionalAccess', _57 => _57.length]) && !!_optionalChain([annotationLookup, 'optionalAccess', _58 => _58.size]) && plotHeight > 0;
|
|
1060
1122
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1061
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1123
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.GlobalChartStyleOverrides, {}),
|
|
1062
1124
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1063
1125
|
_highchartsreactofficial.HighchartsReact,
|
|
1064
1126
|
{
|
|
@@ -1077,7 +1139,7 @@ function ChartRenderer({
|
|
|
1077
1139
|
}
|
|
1078
1140
|
) : null,
|
|
1079
1141
|
chart ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1080
|
-
|
|
1142
|
+
_chunk34OKRQETjs.ChartTooltipPortal,
|
|
1081
1143
|
{
|
|
1082
1144
|
chart,
|
|
1083
1145
|
renderContent: (context) => {
|
|
@@ -1108,23 +1170,33 @@ function ChartRenderer({
|
|
|
1108
1170
|
] : (
|
|
1109
1171
|
// Drop v1's `readonly` wrapper (v2 is mutable); icon is forwarded
|
|
1110
1172
|
// from `series[]` by index below since the helper doesn't carry it.
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1173
|
+
(() => {
|
|
1174
|
+
const showPercent = isChartPercentStacked(options) && series.length > 1;
|
|
1175
|
+
const pctCtx = context;
|
|
1176
|
+
const pointIndex = pctCtx.point.index;
|
|
1177
|
+
const chartSeries = pctCtx.series.chart.series;
|
|
1178
|
+
return _chunk34OKRQETjs.transformTimeSeriesTooltipData.call(void 0, {
|
|
1179
|
+
context,
|
|
1180
|
+
data: series.map((s, i) => ({
|
|
1181
|
+
name: s.name,
|
|
1182
|
+
points: [],
|
|
1183
|
+
styles: { color: _nullishCoalesce(_nullishCoalesce(s.color, () => ( colors[i])), () => ( "")) }
|
|
1184
|
+
}))
|
|
1185
|
+
}).map((row, i) => {
|
|
1186
|
+
const percentage = _optionalChain([chartSeries, 'access', _65 => _65[i], 'optionalAccess', _66 => _66.points, 'optionalAccess', _67 => _67[pointIndex], 'optionalAccess', _68 => _68.percentage]);
|
|
1187
|
+
return {
|
|
1188
|
+
color: row.color,
|
|
1189
|
+
name: row.name,
|
|
1190
|
+
value: row.value,
|
|
1191
|
+
icon: _optionalChain([series, 'access', _69 => _69[i], 'optionalAccess', _70 => _70.icon]),
|
|
1192
|
+
...showPercent && typeof percentage === "number" && !isNaN(percentage) ? { percent: percentage } : {}
|
|
1193
|
+
};
|
|
1194
|
+
});
|
|
1195
|
+
})()
|
|
1124
1196
|
);
|
|
1125
1197
|
const position = isPie || isPackedBubble ? _nullishCoalesce(ctx.key, () => ( ctx.point.name)) : context.x;
|
|
1126
|
-
const tickPositions = _optionalChain([ctx, 'access',
|
|
1127
|
-
const resolved = _optionalChain([annotationLookup, 'optionalAccess',
|
|
1198
|
+
const tickPositions = _optionalChain([ctx, 'access', _71 => _71.points, 'optionalAccess', _72 => _72[0], 'optionalAccess', _73 => _73.series, 'optionalAccess', _74 => _74.xAxis, 'optionalAccess', _75 => _75.tickPositions]);
|
|
1199
|
+
const resolved = _optionalChain([annotationLookup, 'optionalAccess', _76 => _76.get, 'call', _77 => _77(context.point.x)]);
|
|
1128
1200
|
const annotation = resolved ? {
|
|
1129
1201
|
icon: resolved.icon,
|
|
1130
1202
|
color: resolved.color,
|
|
@@ -1171,4 +1243,4 @@ function ChartRenderer({
|
|
|
1171
1243
|
|
|
1172
1244
|
|
|
1173
1245
|
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;
|
|
1174
|
-
//# sourceMappingURL=chunk-
|
|
1246
|
+
//# sourceMappingURL=chunk-5TWNMPQU.js.map
|