@sproutsocial/seeds-react-data-viz 0.25.1 → 0.26.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/bar/index.js +10 -10
- package/dist/bubble/index.js +4 -4
- package/dist/charts.css +139 -12
- package/dist/{chunk-TNZNBMSZ.js → chunk-POMPBGZR.js} +71 -32
- package/dist/chunk-POMPBGZR.js.map +1 -0
- package/dist/{chunk-CWKFNAXF.js → chunk-RHGKZW6Y.js} +3 -3
- package/dist/{chunk-CWKFNAXF.js.map → chunk-RHGKZW6Y.js.map} +1 -1
- package/dist/{chunk-2A3KLUIF.js → chunk-XUAHFLZQ.js} +3 -3
- package/dist/{chunk-2A3KLUIF.js.map → chunk-XUAHFLZQ.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-V63L6753.js → chunk-4IWPHCZ4.js} +45 -6
- package/dist/esm/chunk-4IWPHCZ4.js.map +1 -0
- package/dist/esm/{chunk-CIG5NERD.js → chunk-QBFXLKBO.js} +2 -2
- package/dist/esm/{chunk-AJGRGRI6.js → chunk-SM2B52UR.js} +2 -2
- 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-CIG5NERD.js.map → chunk-QBFXLKBO.js.map} +0 -0
- /package/dist/esm/{chunk-AJGRGRI6.js.map → chunk-SM2B52UR.js.map} +0 -0
package/dist/bar/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkRHGKZW6Yjs = require('../chunk-RHGKZW6Y.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkXUAHFLZQjs = require('../chunk-XUAHFLZQ.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
|
|
@@ -14,7 +14,7 @@ var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkPOMPBGZRjs = require('../chunk-POMPBGZR.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _chunkLWDHU4QKjs = require('../chunk-LWDHU4QK.js');
|
|
@@ -30,8 +30,8 @@ function buildBarChartOptions(props, direction, series = props.series) {
|
|
|
30
30
|
const chartType = highchartsType(direction);
|
|
31
31
|
const isDatetime = props.xAxis.type === "datetime";
|
|
32
32
|
const isMultiSeries = series.length > 1;
|
|
33
|
-
const tooltipOptions =
|
|
34
|
-
const { annotations, lookup: annotationLookup } =
|
|
33
|
+
const tooltipOptions = _chunkXUAHFLZQjs.resolveTooltipOptions.call(void 0, props);
|
|
34
|
+
const { annotations, lookup: annotationLookup } = _chunkRHGKZW6Yjs.buildAnnotationConfig.call(void 0,
|
|
35
35
|
props.annotations
|
|
36
36
|
);
|
|
37
37
|
const barTypeConfig = {
|
|
@@ -91,7 +91,7 @@ function buildBarChartOptions(props, direction, series = props.series) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
-
const base =
|
|
94
|
+
const base = _chunkPOMPBGZRjs.buildBaseChartOptions.call(void 0, {
|
|
95
95
|
type: chartType,
|
|
96
96
|
description: props.description,
|
|
97
97
|
reserveTopMargin: Boolean(annotations),
|
|
@@ -112,7 +112,7 @@ function buildBarChartOptions(props, direction, series = props.series) {
|
|
|
112
112
|
// spacing ([10, 10, 15, 10]) shrinks the plot area.
|
|
113
113
|
spacing: [5, 1, 0, 2]
|
|
114
114
|
},
|
|
115
|
-
xAxis:
|
|
115
|
+
xAxis: _chunkXUAHFLZQjs.buildDimensionalAxis.call(void 0, props.xAxis, _nullishCoalesce(tooltipOptions.timezone, () => ( "UTC"))),
|
|
116
116
|
yAxis: {
|
|
117
117
|
min: _optionalChain([props, 'access', _15 => _15.yAxis, 'optionalAccess', _16 => _16.min]),
|
|
118
118
|
max: _optionalChain([props, 'access', _17 => _17.yAxis, 'optionalAccess', _18 => _18.max]),
|
|
@@ -126,7 +126,7 @@ function buildBarChartOptions(props, direction, series = props.series) {
|
|
|
126
126
|
enabled: _optionalChain([props, 'access', _23 => _23.yAxis, 'optionalAccess', _24 => _24.showLabels]) !== false,
|
|
127
127
|
// A declarative `format` drives ticks through the shared valueFormatter;
|
|
128
128
|
// absent it, the zero-config decimal default (1.20K / 1.20M / 1.20B).
|
|
129
|
-
formatter: _optionalChain([props, 'access', _25 => _25.yAxis, 'optionalAccess', _26 => _26.format]) ?
|
|
129
|
+
formatter: _optionalChain([props, 'access', _25 => _25.yAxis, 'optionalAccess', _26 => _26.format]) ? _chunkRHGKZW6Yjs.makeValueAxisLabelFormatter.call(void 0, props.yAxis.format) : _chunkRHGKZW6Yjs.defaultValueAxisLabelFormatter
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
plotOptions: {
|
|
@@ -151,7 +151,7 @@ var BAR_CHART_DEFAULT_SERIES_LIMIT = 10;
|
|
|
151
151
|
var _jsxruntime = require('react/jsx-runtime');
|
|
152
152
|
var BarChart = _react.memo.call(void 0, function BarChart2(props) {
|
|
153
153
|
const seriesLimit = _nullishCoalesce(props.seriesLimit, () => ( BAR_CHART_DEFAULT_SERIES_LIMIT));
|
|
154
|
-
const { colors, series } =
|
|
154
|
+
const { colors, series } = _chunkPOMPBGZRjs.useSeedsChartSetup.call(void 0, {
|
|
155
155
|
series: props.series,
|
|
156
156
|
seriesLimit,
|
|
157
157
|
isSeriesLimitOverridden: props.seriesLimit !== void 0,
|
|
@@ -171,7 +171,7 @@ var BarChart = _react.memo.call(void 0, function BarChart2(props) {
|
|
|
171
171
|
className: props.className
|
|
172
172
|
});
|
|
173
173
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ...containerProps, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
174
|
-
|
|
174
|
+
_chunkPOMPBGZRjs.ChartRenderer,
|
|
175
175
|
{
|
|
176
176
|
options,
|
|
177
177
|
series,
|
package/dist/bubble/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkPOMPBGZRjs = require('../chunk-POMPBGZR.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -106,7 +106,7 @@ function mapBubbleTooltipRow(data) {
|
|
|
106
106
|
}
|
|
107
107
|
function buildBubbleChartOptions(props) {
|
|
108
108
|
const hasOnClick = Boolean(props.onClick);
|
|
109
|
-
const base =
|
|
109
|
+
const base = _chunkPOMPBGZRjs.buildBaseChartOptions.call(void 0, {
|
|
110
110
|
type: "packedbubble",
|
|
111
111
|
description: props.accessibility.description,
|
|
112
112
|
svgContainerLabel: props.accessibility.svgContainerLabel,
|
|
@@ -181,7 +181,7 @@ function buildBubbleChartOptions(props) {
|
|
|
181
181
|
// src/charts/bubble/BubbleChart.tsx
|
|
182
182
|
var _jsxruntime = require('react/jsx-runtime');
|
|
183
183
|
var BubbleChart = _react.memo.call(void 0, function BubbleChart2(props) {
|
|
184
|
-
const { colors } =
|
|
184
|
+
const { colors } = _chunkPOMPBGZRjs.useSeedsChartSetup.call(void 0, {
|
|
185
185
|
series: props.data.map((d) => ({ color: d.color }))
|
|
186
186
|
});
|
|
187
187
|
const options = _react.useMemo.call(void 0, () => buildBubbleChartOptions(props), [props]);
|
|
@@ -205,7 +205,7 @@ var BubbleChart = _react.memo.call(void 0, function BubbleChart2(props) {
|
|
|
205
205
|
...hasOnPlotBackgroundClick ? { "data-has-on-plot-background-click": "" } : {},
|
|
206
206
|
onClick: props.onPlotBackgroundClick,
|
|
207
207
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
208
|
-
|
|
208
|
+
_chunkPOMPBGZRjs.ChartRenderer,
|
|
209
209
|
{
|
|
210
210
|
options,
|
|
211
211
|
series: props.data.map((d, i) => ({
|
package/dist/charts.css
CHANGED
|
@@ -700,7 +700,7 @@
|
|
|
700
700
|
* Seeds WordCloud family styles.
|
|
701
701
|
*
|
|
702
702
|
* The wordcloud-specific layer on top of the shared `chart-styles.css`
|
|
703
|
-
* foundation, implementing a
|
|
703
|
+
* foundation, implementing a four-layer opacity model:
|
|
704
704
|
*
|
|
705
705
|
* 1. Weight ramp — per-point `opacity` set once in the adapter's series
|
|
706
706
|
* data (wordcloud/adapter.ts), landing as an SVG
|
|
@@ -710,23 +710,39 @@
|
|
|
710
710
|
* attribute (set from `activeGroupId`, resolved against
|
|
711
711
|
* `groups`), scoped per adapter-assigned
|
|
712
712
|
* `.seeds-wordcloud-word--group-{n}` class.
|
|
713
|
+
* 2b. Name dim — below. Gated on the wrapper's `data-active-word-indices`
|
|
714
|
+
* attribute (set from `activeNames`, resolved by
|
|
715
|
+
* `WordCloud.tsx`'s `resolveActiveWordIndices` against
|
|
716
|
+
* the rendered points — names are unbounded, unlike
|
|
717
|
+
* `groups`, so this keys off each point's bounded
|
|
718
|
+
* rendered position instead), scoped per
|
|
719
|
+
* `.seeds-wordcloud-word--index-{n}` class. The active
|
|
720
|
+
* set can contain several indices at once (e.g. every
|
|
721
|
+
* occurrence of a hovered term across competitor
|
|
722
|
+
* groups), so this layer uses the list-attribute
|
|
723
|
+
* selector (`~=`) instead of layer 2's exact match (`=`).
|
|
713
724
|
* 3. Hover — below. Highcharts' native `.highcharts-point-hover`/
|
|
714
725
|
* `.highcharts-point-inactive`, inherited from
|
|
715
|
-
* ColumnSeries state handling.
|
|
716
|
-
*
|
|
717
|
-
*
|
|
718
|
-
*
|
|
726
|
+
* ColumnSeries state handling. Only active when the
|
|
727
|
+
* consumer hasn't opted into layer 2b (see
|
|
728
|
+
* `buildWordCloudOptions`'s `hasActiveNames` — the
|
|
729
|
+
* consumer's own set drives dimming unopposed once
|
|
730
|
+
* they've taken it over, instead of fighting Highcharts'
|
|
731
|
+
* own hover-triggered `inactiveOtherPoints`).
|
|
732
|
+
*
|
|
733
|
+
* All layers write the CSS `opacity` *property*, never `fill-opacity`: a
|
|
734
|
+
* presentation attribute (layer 1) resolves in the author origin at
|
|
719
735
|
* specificity 0, so any author `opacity` declaration here replaces it
|
|
720
736
|
* outright rather than multiplying with it. This matches `donut/donut.css`'s
|
|
721
737
|
* existing opacity-property dimming.
|
|
722
738
|
*
|
|
723
|
-
* Layers 2 and 3 can coexist (hovering a word while `activeGroupId` is
|
|
724
|
-
* and layer 3 must always win. The layer 2 rules
|
|
725
|
-
* `.highcharts-point-hover`/`.highcharts-point-inactive` from
|
|
726
|
-
* for exactly this: the moment any point is hovered
|
|
727
|
-
*
|
|
728
|
-
*
|
|
729
|
-
* `!important` needed.
|
|
739
|
+
* Layers 2/2b and 3 can coexist (hovering a word while `activeGroupId` is
|
|
740
|
+
* set), and layer 3 must always win when it's active. The layer 2/2b rules
|
|
741
|
+
* below exclude `.highcharts-point-hover`/`.highcharts-point-inactive` from
|
|
742
|
+
* their selector for exactly this: the moment any point is hovered (with
|
|
743
|
+
* `inactiveOtherPoints: true`), every point in the series carries one of
|
|
744
|
+
* those two classes, so layers 2/2b stop matching anything and layer 3 takes
|
|
745
|
+
* over completely, with no `!important` needed.
|
|
730
746
|
*
|
|
731
747
|
* Consumers import BOTH stylesheets once (the component never self-imports):
|
|
732
748
|
*
|
|
@@ -775,3 +791,114 @@
|
|
|
775
791
|
.seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="19"]) .seeds-wordcloud-word--group-19:not(.highcharts-point-hover):not(.highcharts-point-inactive) {
|
|
776
792
|
opacity: 0.4;
|
|
777
793
|
}
|
|
794
|
+
|
|
795
|
+
/* Layer 2b: name dim. Only active when the wrapper sets
|
|
796
|
+
`data-active-word-indices` (resolved from `activeNames` against the
|
|
797
|
+
rendered points); bounded by `WORD_CLOUD_MAXIMUM_WORD_COUNT` (100 —
|
|
798
|
+
adapter.ts). Excludes hover-state classes so layer 3 always wins during a
|
|
799
|
+
hover (see the file header). Uses the list-attribute selector (`~=`),
|
|
800
|
+
unlike layer 2's exact match (`=`), since several indices can be active at
|
|
801
|
+
once. One shared declaration: every index dims to the same 0.4, only the
|
|
802
|
+
selector differs. */
|
|
803
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="0"]) .seeds-wordcloud-word--index-0:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
804
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="1"]) .seeds-wordcloud-word--index-1:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
805
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="2"]) .seeds-wordcloud-word--index-2:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
806
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="3"]) .seeds-wordcloud-word--index-3:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
807
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="4"]) .seeds-wordcloud-word--index-4:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
808
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="5"]) .seeds-wordcloud-word--index-5:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
809
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="6"]) .seeds-wordcloud-word--index-6:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
810
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="7"]) .seeds-wordcloud-word--index-7:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
811
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="8"]) .seeds-wordcloud-word--index-8:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
812
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="9"]) .seeds-wordcloud-word--index-9:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
813
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="10"]) .seeds-wordcloud-word--index-10:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
814
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="11"]) .seeds-wordcloud-word--index-11:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
815
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="12"]) .seeds-wordcloud-word--index-12:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
816
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="13"]) .seeds-wordcloud-word--index-13:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
817
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="14"]) .seeds-wordcloud-word--index-14:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
818
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="15"]) .seeds-wordcloud-word--index-15:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
819
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="16"]) .seeds-wordcloud-word--index-16:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
820
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="17"]) .seeds-wordcloud-word--index-17:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
821
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="18"]) .seeds-wordcloud-word--index-18:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
822
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="19"]) .seeds-wordcloud-word--index-19:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
823
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="20"]) .seeds-wordcloud-word--index-20:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
824
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="21"]) .seeds-wordcloud-word--index-21:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
825
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="22"]) .seeds-wordcloud-word--index-22:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
826
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="23"]) .seeds-wordcloud-word--index-23:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
827
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="24"]) .seeds-wordcloud-word--index-24:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
828
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="25"]) .seeds-wordcloud-word--index-25:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
829
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="26"]) .seeds-wordcloud-word--index-26:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
830
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="27"]) .seeds-wordcloud-word--index-27:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
831
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="28"]) .seeds-wordcloud-word--index-28:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
832
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="29"]) .seeds-wordcloud-word--index-29:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
833
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="30"]) .seeds-wordcloud-word--index-30:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
834
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="31"]) .seeds-wordcloud-word--index-31:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
835
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="32"]) .seeds-wordcloud-word--index-32:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
836
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="33"]) .seeds-wordcloud-word--index-33:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
837
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="34"]) .seeds-wordcloud-word--index-34:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
838
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="35"]) .seeds-wordcloud-word--index-35:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
839
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="36"]) .seeds-wordcloud-word--index-36:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
840
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="37"]) .seeds-wordcloud-word--index-37:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
841
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="38"]) .seeds-wordcloud-word--index-38:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
842
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="39"]) .seeds-wordcloud-word--index-39:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
843
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="40"]) .seeds-wordcloud-word--index-40:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
844
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="41"]) .seeds-wordcloud-word--index-41:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
845
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="42"]) .seeds-wordcloud-word--index-42:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
846
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="43"]) .seeds-wordcloud-word--index-43:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
847
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="44"]) .seeds-wordcloud-word--index-44:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
848
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="45"]) .seeds-wordcloud-word--index-45:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
849
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="46"]) .seeds-wordcloud-word--index-46:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
850
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="47"]) .seeds-wordcloud-word--index-47:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
851
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="48"]) .seeds-wordcloud-word--index-48:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
852
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="49"]) .seeds-wordcloud-word--index-49:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
853
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="50"]) .seeds-wordcloud-word--index-50:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
854
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="51"]) .seeds-wordcloud-word--index-51:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
855
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="52"]) .seeds-wordcloud-word--index-52:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
856
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="53"]) .seeds-wordcloud-word--index-53:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
857
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="54"]) .seeds-wordcloud-word--index-54:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
858
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="55"]) .seeds-wordcloud-word--index-55:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
859
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="56"]) .seeds-wordcloud-word--index-56:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
860
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="57"]) .seeds-wordcloud-word--index-57:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
861
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="58"]) .seeds-wordcloud-word--index-58:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
862
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="59"]) .seeds-wordcloud-word--index-59:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
863
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="60"]) .seeds-wordcloud-word--index-60:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
864
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="61"]) .seeds-wordcloud-word--index-61:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
865
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="62"]) .seeds-wordcloud-word--index-62:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
866
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="63"]) .seeds-wordcloud-word--index-63:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
867
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="64"]) .seeds-wordcloud-word--index-64:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
868
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="65"]) .seeds-wordcloud-word--index-65:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
869
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="66"]) .seeds-wordcloud-word--index-66:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
870
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="67"]) .seeds-wordcloud-word--index-67:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
871
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="68"]) .seeds-wordcloud-word--index-68:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
872
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="69"]) .seeds-wordcloud-word--index-69:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
873
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="70"]) .seeds-wordcloud-word--index-70:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
874
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="71"]) .seeds-wordcloud-word--index-71:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
875
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="72"]) .seeds-wordcloud-word--index-72:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
876
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="73"]) .seeds-wordcloud-word--index-73:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
877
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="74"]) .seeds-wordcloud-word--index-74:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
878
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="75"]) .seeds-wordcloud-word--index-75:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
879
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="76"]) .seeds-wordcloud-word--index-76:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
880
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="77"]) .seeds-wordcloud-word--index-77:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
881
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="78"]) .seeds-wordcloud-word--index-78:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
882
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="79"]) .seeds-wordcloud-word--index-79:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
883
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="80"]) .seeds-wordcloud-word--index-80:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
884
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="81"]) .seeds-wordcloud-word--index-81:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
885
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="82"]) .seeds-wordcloud-word--index-82:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
886
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="83"]) .seeds-wordcloud-word--index-83:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
887
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="84"]) .seeds-wordcloud-word--index-84:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
888
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="85"]) .seeds-wordcloud-word--index-85:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
889
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="86"]) .seeds-wordcloud-word--index-86:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
890
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="87"]) .seeds-wordcloud-word--index-87:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
891
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="88"]) .seeds-wordcloud-word--index-88:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
892
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="89"]) .seeds-wordcloud-word--index-89:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
893
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="90"]) .seeds-wordcloud-word--index-90:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
894
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="91"]) .seeds-wordcloud-word--index-91:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
895
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="92"]) .seeds-wordcloud-word--index-92:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
896
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="93"]) .seeds-wordcloud-word--index-93:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
897
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="94"]) .seeds-wordcloud-word--index-94:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
898
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="95"]) .seeds-wordcloud-word--index-95:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
899
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="96"]) .seeds-wordcloud-word--index-96:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
900
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="97"]) .seeds-wordcloud-word--index-97:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
901
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="98"]) .seeds-wordcloud-word--index-98:not(.highcharts-point-hover):not(.highcharts-point-inactive),
|
|
902
|
+
.seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="99"]) .seeds-wordcloud-word--index-99:not(.highcharts-point-hover):not(.highcharts-point-inactive) {
|
|
903
|
+
opacity: 0.4;
|
|
904
|
+
}
|
|
@@ -132,9 +132,34 @@ function resolvePointOpacity({
|
|
|
132
132
|
const t = normalizeWeight(weight, min, max);
|
|
133
133
|
return rangeMin + t * (rangeMax - rangeMin);
|
|
134
134
|
}
|
|
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
|
+
}
|
|
135
160
|
function transformWordCloudDataToPoints(data, groups, opacityRange, maxWordCount = WORD_CLOUD_MAXIMUM_WORD_COUNT) {
|
|
136
|
-
const capped = [...data].sort((a, b) => b.weight - a.weight).slice(0, maxWordCount);
|
|
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);
|
|
@@ -153,7 +178,7 @@ function transformWordCloudDataToPoints(data, groups, opacityRange, maxWordCount
|
|
|
153
178
|
isEmojiOnly: isEmojiOnlyTerm(point.name),
|
|
154
179
|
opacityRange
|
|
155
180
|
}),
|
|
156
|
-
className: `seeds-wordcloud-word--group-${colorIndex}`,
|
|
181
|
+
className: `seeds-wordcloud-word--group-${colorIndex} seeds-wordcloud-word--index-${i}`,
|
|
157
182
|
custom: { groupId: point.groupId, rawWeight: point.weight }
|
|
158
183
|
};
|
|
159
184
|
});
|
|
@@ -172,7 +197,7 @@ function transformWordCloudClickData(event) {
|
|
|
172
197
|
}
|
|
173
198
|
return { ...base, pageX: _nullishCoalesce(event.pageX, () => ( 0)), pageY: _nullishCoalesce(event.pageY, () => ( 0)) };
|
|
174
199
|
}
|
|
175
|
-
function buildWordCloudOptions(props, containerWidth) {
|
|
200
|
+
function buildWordCloudOptions(props, containerWidth, hasActiveNames = false) {
|
|
176
201
|
const opacityRange = _nullishCoalesce(props.opacityRange, () => ( DEFAULT_OPACITY_RANGE));
|
|
177
202
|
const points = transformWordCloudDataToPoints(
|
|
178
203
|
props.data,
|
|
@@ -215,8 +240,11 @@ function buildWordCloudOptions(props, containerWidth) {
|
|
|
215
240
|
// Hover dim (layer 3). Off by default for column-derived series
|
|
216
241
|
// (wordcloud's base class) — pie is the only series type that
|
|
217
242
|
// defaults this to `true`. Without it, Highcharts never adds
|
|
218
|
-
// `.highcharts-point-inactive` to the other words on hover.
|
|
219
|
-
|
|
243
|
+
// `.highcharts-point-inactive` to the other words on hover. Turned
|
|
244
|
+
// off entirely once the consumer has opted into `activeNames`-driven
|
|
245
|
+
// emphasis — otherwise Highcharts' own hover pass fights the
|
|
246
|
+
// consumer's `data-active-word-indices` dimming (wordcloud.css).
|
|
247
|
+
inactiveOtherPoints: !hasActiveNames,
|
|
220
248
|
minFontSize: _nullishCoalesce(props.minFontSize, () => ( WORD_CLOUD_MIN_FONT_SIZE)),
|
|
221
249
|
// An explicit prop wins; otherwise derived from the measured
|
|
222
250
|
// container width (`WordCloud.tsx`'s `useMeasure` call). Must stay a
|
|
@@ -246,6 +274,17 @@ function buildWordCloudOptions(props, containerWidth) {
|
|
|
246
274
|
_optionalChain([event, 'access', _7 => _7.stopPropagation, 'optionalCall', _8 => _8()]);
|
|
247
275
|
if (event.type !== "click" && !event.target) return;
|
|
248
276
|
props.onClick(transformWordCloudClickData(event));
|
|
277
|
+
} : void 0,
|
|
278
|
+
mouseOver: props.onWordHover ? (event) => {
|
|
279
|
+
const point = event.target;
|
|
280
|
+
if (!point) return;
|
|
281
|
+
props.onWordHover({
|
|
282
|
+
name: point.name,
|
|
283
|
+
groupId: _optionalChain([point, 'access', _9 => _9.custom, 'optionalAccess', _10 => _10.groupId])
|
|
284
|
+
});
|
|
285
|
+
} : void 0,
|
|
286
|
+
mouseOut: props.onWordHover ? () => {
|
|
287
|
+
props.onWordHover(null);
|
|
249
288
|
} : void 0
|
|
250
289
|
}
|
|
251
290
|
}
|
|
@@ -329,7 +368,7 @@ var ChartAnnotationMarkerPortal = _react.memo.call(void 0,
|
|
|
329
368
|
(annotation) => annotation.setAttribute(MARKER_ATTR, "false")
|
|
330
369
|
);
|
|
331
370
|
annotationContext.labels.forEach((label) => {
|
|
332
|
-
const labelElement = _optionalChain([label, 'access',
|
|
371
|
+
const labelElement = _optionalChain([label, 'access', _11 => _11.graphic, 'optionalAccess', _12 => _12.div]);
|
|
333
372
|
if (!labelElement) return;
|
|
334
373
|
let annotationDiv = labelElement.querySelector(
|
|
335
374
|
`div[${MARKER_ATTR}]`
|
|
@@ -339,7 +378,7 @@ var ChartAnnotationMarkerPortal = _react.memo.call(void 0,
|
|
|
339
378
|
labelElement.appendChild(annotationDiv);
|
|
340
379
|
}
|
|
341
380
|
annotationDiv.setAttribute(MARKER_ATTR, "true");
|
|
342
|
-
const xValue = _optionalChain([label, 'access',
|
|
381
|
+
const xValue = _optionalChain([label, 'access', _13 => _13.options, 'optionalAccess', _14 => _14.point, 'optionalAccess', _15 => _15.x]);
|
|
343
382
|
newContainers[xValue] = annotationDiv;
|
|
344
383
|
});
|
|
345
384
|
annotationContainers.current = newContainers;
|
|
@@ -406,9 +445,9 @@ var getDatePartsInTimezone = (date, timezone) => {
|
|
|
406
445
|
});
|
|
407
446
|
const parts = formatter.formatToParts(date);
|
|
408
447
|
return {
|
|
409
|
-
day: parseInt(_nullishCoalesce(_optionalChain([parts, 'access',
|
|
410
|
-
month: parseInt(_nullishCoalesce(_optionalChain([parts, 'access',
|
|
411
|
-
year: parseInt(_nullishCoalesce(_optionalChain([parts, 'access',
|
|
448
|
+
day: parseInt(_nullishCoalesce(_optionalChain([parts, 'access', _16 => _16.find, 'call', _17 => _17((p) => p.type === "day"), 'optionalAccess', _18 => _18.value]), () => ( "0")), 10),
|
|
449
|
+
month: parseInt(_nullishCoalesce(_optionalChain([parts, 'access', _19 => _19.find, 'call', _20 => _20((p) => p.type === "month"), 'optionalAccess', _21 => _21.value]), () => ( "0")), 10),
|
|
450
|
+
year: parseInt(_nullishCoalesce(_optionalChain([parts, 'access', _22 => _22.find, 'call', _23 => _23((p) => p.type === "year"), 'optionalAccess', _24 => _24.value]), () => ( "0")), 10)
|
|
412
451
|
};
|
|
413
452
|
};
|
|
414
453
|
var deriveGranularity = (tickPositions) => {
|
|
@@ -467,20 +506,20 @@ function datetimeFormatter({
|
|
|
467
506
|
switch (granularity) {
|
|
468
507
|
case "hour":
|
|
469
508
|
firstPartOptions = timeFormat === "24" ? { hour: "numeric", minute: "numeric", hour12: false } : { hour: "numeric" };
|
|
470
|
-
if (isFirst || valueParts.day !== _optionalChain([previousValueParts, 'optionalAccess',
|
|
509
|
+
if (isFirst || valueParts.day !== _optionalChain([previousValueParts, 'optionalAccess', _25 => _25.day])) {
|
|
471
510
|
secondPartOptions = { day: "numeric", month: "short" };
|
|
472
511
|
}
|
|
473
512
|
break;
|
|
474
513
|
case "day":
|
|
475
514
|
case "week":
|
|
476
515
|
firstPartOptions = { day: "numeric" };
|
|
477
|
-
if (isFirst || valueParts.month !== _optionalChain([previousValueParts, 'optionalAccess',
|
|
516
|
+
if (isFirst || valueParts.month !== _optionalChain([previousValueParts, 'optionalAccess', _26 => _26.month])) {
|
|
478
517
|
secondPartOptions = { month: "short" };
|
|
479
518
|
}
|
|
480
519
|
break;
|
|
481
520
|
case "month":
|
|
482
521
|
firstPartOptions = { month: "short" };
|
|
483
|
-
if (isFirst || valueParts.year !== _optionalChain([previousValueParts, 'optionalAccess',
|
|
522
|
+
if (isFirst || valueParts.year !== _optionalChain([previousValueParts, 'optionalAccess', _27 => _27.year])) {
|
|
484
523
|
secondPartOptions = { year: "numeric" };
|
|
485
524
|
}
|
|
486
525
|
break;
|
|
@@ -813,7 +852,7 @@ function buildExportChartOptions({
|
|
|
813
852
|
colors,
|
|
814
853
|
exportTitle: rawTitle
|
|
815
854
|
}) {
|
|
816
|
-
const exportTitle = _optionalChain([rawTitle, 'optionalAccess',
|
|
855
|
+
const exportTitle = _optionalChain([rawTitle, 'optionalAccess', _28 => _28.trim, 'call', _29 => _29()]);
|
|
817
856
|
const axisOptions = {
|
|
818
857
|
lineColor: theme.colors.container.border.base,
|
|
819
858
|
gridLineColor: theme.colors.container.border.base,
|
|
@@ -885,7 +924,7 @@ function buildExportChartOptions({
|
|
|
885
924
|
};
|
|
886
925
|
}
|
|
887
926
|
function createChartExportHandle(chart, getExportChartOptions) {
|
|
888
|
-
const resolveName = (filename) => _nullishCoalesce(filename, () => ( defaultFilename(_optionalChain([chart, 'access',
|
|
927
|
+
const resolveName = (filename) => _nullishCoalesce(filename, () => ( defaultFilename(_optionalChain([chart, 'access', _30 => _30.options, 'access', _31 => _31.chart, 'optionalAccess', _32 => _32.type]), /* @__PURE__ */ new Date())));
|
|
889
928
|
const exportImage = async (type, filename) => {
|
|
890
929
|
chart.exportChartLocal(
|
|
891
930
|
{ type, filename: resolveName(filename) },
|
|
@@ -935,7 +974,7 @@ function ChartRenderer({
|
|
|
935
974
|
const exportThemeRef = _react.useRef.call(void 0, { theme, colors, exportTitle });
|
|
936
975
|
exportThemeRef.current = { theme, colors, exportTitle };
|
|
937
976
|
const captureChart = _react.useCallback.call(void 0, (chartInstance) => {
|
|
938
|
-
const forExport = _optionalChain([chartInstance, 'access',
|
|
977
|
+
const forExport = _optionalChain([chartInstance, 'access', _33 => _33.options, 'access', _34 => _34.chart, 'optionalAccess', _35 => _35.forExport]);
|
|
939
978
|
if (!forExport) {
|
|
940
979
|
setChart(chartInstance);
|
|
941
980
|
setPlotHeight(chartInstance.plotHeight);
|
|
@@ -945,7 +984,7 @@ function ChartRenderer({
|
|
|
945
984
|
onReadyRef.current = onReady;
|
|
946
985
|
_react.useEffect.call(void 0, () => {
|
|
947
986
|
if (!chart) return;
|
|
948
|
-
_optionalChain([onReadyRef, 'access',
|
|
987
|
+
_optionalChain([onReadyRef, 'access', _36 => _36.current, 'optionalCall', _37 => _37(
|
|
949
988
|
createChartExportHandle(
|
|
950
989
|
chart,
|
|
951
990
|
() => buildExportChartOptions(exportThemeRef.current)
|
|
@@ -961,18 +1000,18 @@ function ChartRenderer({
|
|
|
961
1000
|
return () => unbind();
|
|
962
1001
|
}, [chart]);
|
|
963
1002
|
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',
|
|
1003
|
+
const pointDescriptionFormatter = _optionalChain([options, 'access', _38 => _38.accessibility, 'optionalAccess', _39 => _39.point, 'optionalAccess', _40 => _40.descriptionFormatter]);
|
|
1004
|
+
const svgContainerLabel = _optionalChain([options, 'access', _41 => _41.accessibility, 'optionalAccess', _42 => _42.svgContainerLabel]);
|
|
1005
|
+
const packedBubbleDataLabelFormatter = _optionalChain([options, 'access', _43 => _43.plotOptions, 'optionalAccess', _44 => _44.packedbubble, 'optionalAccess', _45 => _45.dataLabels, 'optionalAccess', _46 => _46.formatter]);
|
|
967
1006
|
return {
|
|
968
1007
|
...options,
|
|
969
1008
|
...packedBubbleDataLabelFormatter ? {
|
|
970
1009
|
plotOptions: {
|
|
971
1010
|
...options.plotOptions,
|
|
972
1011
|
packedbubble: {
|
|
973
|
-
..._optionalChain([options, 'access',
|
|
1012
|
+
..._optionalChain([options, 'access', _47 => _47.plotOptions, 'optionalAccess', _48 => _48.packedbubble]),
|
|
974
1013
|
dataLabels: {
|
|
975
|
-
..._optionalChain([options, 'access',
|
|
1014
|
+
..._optionalChain([options, 'access', _49 => _49.plotOptions, 'optionalAccess', _50 => _50.packedbubble, 'optionalAccess', _51 => _51.dataLabels]),
|
|
976
1015
|
formatter() {
|
|
977
1016
|
const bubblePoint = this.point;
|
|
978
1017
|
return packedBubbleDataLabelFormatter.call({
|
|
@@ -982,7 +1021,7 @@ function ChartRenderer({
|
|
|
982
1021
|
index: bubblePoint.index,
|
|
983
1022
|
series: { index: bubblePoint.series.index }
|
|
984
1023
|
},
|
|
985
|
-
radius: _nullishCoalesce(_optionalChain([bubblePoint, 'access',
|
|
1024
|
+
radius: _nullishCoalesce(_optionalChain([bubblePoint, 'access', _52 => _52.marker, 'optionalAccess', _53 => _53.radius]), () => ( 0))
|
|
986
1025
|
});
|
|
987
1026
|
}
|
|
988
1027
|
}
|
|
@@ -990,7 +1029,7 @@ function ChartRenderer({
|
|
|
990
1029
|
}
|
|
991
1030
|
} : {},
|
|
992
1031
|
accessibility: {
|
|
993
|
-
description: _optionalChain([options, 'access',
|
|
1032
|
+
description: _optionalChain([options, 'access', _54 => _54.accessibility, 'optionalAccess', _55 => _55.description]),
|
|
994
1033
|
...pointDescriptionFormatter ? {
|
|
995
1034
|
point: {
|
|
996
1035
|
descriptionFormatter: (point) => {
|
|
@@ -1017,7 +1056,7 @@ function ChartRenderer({
|
|
|
1017
1056
|
}, [options]);
|
|
1018
1057
|
if (series.length === 0) return null;
|
|
1019
1058
|
const chartWithAnnotations = chart;
|
|
1020
|
-
const hasRenderedAnnotations = !!_optionalChain([chartWithAnnotations, 'optionalAccess',
|
|
1059
|
+
const hasRenderedAnnotations = !!_optionalChain([chartWithAnnotations, 'optionalAccess', _56 => _56.annotations, 'optionalAccess', _57 => _57.length]) && !!_optionalChain([annotationLookup, 'optionalAccess', _58 => _58.size]) && plotHeight > 0;
|
|
1021
1060
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1022
1061
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLWDHU4QKjs.GlobalChartStyleOverrides, {}),
|
|
1023
1062
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1043,7 +1082,7 @@ function ChartRenderer({
|
|
|
1043
1082
|
chart,
|
|
1044
1083
|
renderContent: (context) => {
|
|
1045
1084
|
const ctx = context;
|
|
1046
|
-
const isPackedBubble = !ctx.points && _optionalChain([ctx, 'access',
|
|
1085
|
+
const isPackedBubble = !ctx.points && _optionalChain([ctx, 'access', _59 => _59.series, 'optionalAccess', _60 => _60.type]) === "packedbubble";
|
|
1047
1086
|
const isPie = !ctx.points && !isPackedBubble;
|
|
1048
1087
|
const data = isPackedBubble ? (
|
|
1049
1088
|
// Mirrors v1's `transformBubbleChartTooltipData`: color comes from
|
|
@@ -1053,7 +1092,7 @@ function ChartRenderer({
|
|
|
1053
1092
|
color: _nullishCoalesce((ctx.colorIndex !== void 0 ? colors[ctx.colorIndex] : void 0), () => ( "")),
|
|
1054
1093
|
name: _nullishCoalesce(ctx.key, () => ( ctx.point.name)),
|
|
1055
1094
|
value: ctx.point.y,
|
|
1056
|
-
seriesIndex: _optionalChain([ctx, 'access',
|
|
1095
|
+
seriesIndex: _optionalChain([ctx, 'access', _61 => _61.series, 'optionalAccess', _62 => _62.index]),
|
|
1057
1096
|
pointIndex: ctx.point.index
|
|
1058
1097
|
}
|
|
1059
1098
|
]
|
|
@@ -1064,7 +1103,7 @@ function ChartRenderer({
|
|
|
1064
1103
|
value: ctx.point.y,
|
|
1065
1104
|
percent: ctx.point.percentage,
|
|
1066
1105
|
// Icon indexed by the hovered slice — same source the legend reads.
|
|
1067
|
-
icon: _optionalChain([series, 'access',
|
|
1106
|
+
icon: _optionalChain([series, 'access', _63 => _63[ctx.point.index], 'optionalAccess', _64 => _64.icon])
|
|
1068
1107
|
}
|
|
1069
1108
|
] : (
|
|
1070
1109
|
// Drop v1's `readonly` wrapper (v2 is mutable); icon is forwarded
|
|
@@ -1080,12 +1119,12 @@ function ChartRenderer({
|
|
|
1080
1119
|
color: row.color,
|
|
1081
1120
|
name: row.name,
|
|
1082
1121
|
value: row.value,
|
|
1083
|
-
icon: _optionalChain([series, 'access',
|
|
1122
|
+
icon: _optionalChain([series, 'access', _65 => _65[i], 'optionalAccess', _66 => _66.icon])
|
|
1084
1123
|
}))
|
|
1085
1124
|
);
|
|
1086
1125
|
const position = isPie || isPackedBubble ? _nullishCoalesce(ctx.key, () => ( ctx.point.name)) : context.x;
|
|
1087
|
-
const tickPositions = _optionalChain([ctx, 'access',
|
|
1088
|
-
const resolved = _optionalChain([annotationLookup, 'optionalAccess',
|
|
1126
|
+
const tickPositions = _optionalChain([ctx, 'access', _67 => _67.points, 'optionalAccess', _68 => _68[0], 'optionalAccess', _69 => _69.series, 'optionalAccess', _70 => _70.xAxis, 'optionalAccess', _71 => _71.tickPositions]);
|
|
1127
|
+
const resolved = _optionalChain([annotationLookup, 'optionalAccess', _72 => _72.get, 'call', _73 => _73(context.point.x)]);
|
|
1089
1128
|
const annotation = resolved ? {
|
|
1090
1129
|
icon: resolved.icon,
|
|
1091
1130
|
color: resolved.color,
|
|
@@ -1132,4 +1171,4 @@ function ChartRenderer({
|
|
|
1132
1171
|
|
|
1133
1172
|
|
|
1134
1173
|
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-
|
|
1174
|
+
//# sourceMappingURL=chunk-POMPBGZR.js.map
|