@semcore/d3-chart 17.3.1-prerelease.0 → 17.3.1-prerelease.11
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/CHANGELOG.md +3 -1
- package/lib/cjs/Bar.js +16 -16
- package/lib/cjs/CompactHorizontalBar.js +16 -16
- package/lib/cjs/HorizontalBar.js +16 -16
- package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.js +40 -6
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Cigarette/Cigarette.js +9 -12
- package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/cjs/style/bar.shadow.css +2 -1
- package/lib/es6/Bar.js +16 -16
- package/lib/es6/CompactHorizontalBar.js +16 -16
- package/lib/es6/HorizontalBar.js +16 -16
- package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.js +40 -6
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Cigarette/Cigarette.js +9 -12
- package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/es6/style/bar.shadow.css +2 -1
- package/lib/esm/Bar.mjs +17 -17
- package/lib/esm/CompactHorizontalBar.mjs +17 -17
- package/lib/esm/HorizontalBar.mjs +17 -17
- package/lib/esm/component/Chart/CigaretteChart.mjs +40 -6
- package/lib/esm/component/Cigarette/Cigarette.mjs +9 -12
- package/lib/esm/style/bar.shadow.css +2 -1
- package/lib/types/component/Chart/AbstractChart.d.ts +1 -1
- package/lib/types/component/Chart/AbstractChart.d.ts.map +1 -1
- package/lib/types/component/Chart/CigaretteChart.d.ts.map +1 -1
- package/lib/types/component/Cigarette/Cigarette.d.ts.map +1 -1
- package/package.json +15 -15
package/lib/esm/Bar.mjs
CHANGED
|
@@ -12,26 +12,26 @@ const style = (
|
|
|
12
12
|
/*__reshadow_css_start__*/
|
|
13
13
|
(sstyled.insert(
|
|
14
14
|
/*__inner_css_start__*/
|
|
15
|
-
".
|
|
15
|
+
".___SBar_3j3wp_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.58 .168 278.2));transition-property:height,width,y;transition-duration:var(--duration_3j3wp);transition-timing-function:ease-in-out}.___SBar_3j3wp_gg_.__color_3j3wp_gg_{fill:var(--color_3j3wp)}.___SBar_3j3wp_gg_.__pattern_3j3wp_gg_.__color_3j3wp_gg_{fill:var(--pattern_3j3wp);stroke:var(--color_3j3wp);stroke-width:1px}.___SBar_3j3wp_gg_.__hide_3j3wp_gg_{display:none}.___SBar_3j3wp_gg_.__transparent_3j3wp_gg_{opacity:.3}.___SBar_3j3wp_gg_.__onClick_3j3wp_gg_{cursor:pointer}.___SBackground_3j3wp_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg,oklch(.88 .002 175.6));opacity:.4}.___SBackground_3j3wp_gg_.__onClick_3j3wp_gg_{cursor:pointer}.___SBarAnnotation_3j3wp_gg_{display:flex;justify-content:space-between}.___SBarLabel_3j3wp_gg_{color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));margin-right:auto}.___SBarLabel_3j3wp_gg_,.___SBarPercent_3j3wp_gg_{font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,142%)}.___SBarPercent_3j3wp_gg_{color:var(--intergalactic-text-secondary,#00030095);margin-right:var(--intergalactic-spacing-2x,8px)}@media (color-gamut:p3){.___SBarPercent_3j3wp_gg_{color:var(--intergalactic-text-secondary,oklch(.088 .026 147.7/.583))}}.___SBarValue_3j3wp_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,142%);text-align:right}.___SCompactHorizontalBarHoverRect_3j3wp_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover,oklch(.177 .033 175.6/.028))}",
|
|
16
16
|
/*__inner_css_end__*/
|
|
17
|
-
"
|
|
17
|
+
"3j3wp_gg_"
|
|
18
18
|
), /*__reshadow_css_end__*/
|
|
19
19
|
{
|
|
20
|
-
"__SBar": "
|
|
21
|
-
"--duration": "--
|
|
22
|
-
"_color": "
|
|
23
|
-
"--color": "--
|
|
24
|
-
"_pattern": "
|
|
25
|
-
"--pattern": "--
|
|
26
|
-
"_hide": "
|
|
27
|
-
"_transparent": "
|
|
28
|
-
"_onClick": "
|
|
29
|
-
"__SBackground": "
|
|
30
|
-
"__SBarAnnotation": "
|
|
31
|
-
"__SBarLabel": "
|
|
32
|
-
"__SBarPercent": "
|
|
33
|
-
"__SBarValue": "
|
|
34
|
-
"__SCompactHorizontalBarHoverRect": "
|
|
20
|
+
"__SBar": "___SBar_3j3wp_gg_",
|
|
21
|
+
"--duration": "--duration_3j3wp",
|
|
22
|
+
"_color": "__color_3j3wp_gg_",
|
|
23
|
+
"--color": "--color_3j3wp",
|
|
24
|
+
"_pattern": "__pattern_3j3wp_gg_",
|
|
25
|
+
"--pattern": "--pattern_3j3wp",
|
|
26
|
+
"_hide": "__hide_3j3wp_gg_",
|
|
27
|
+
"_transparent": "__transparent_3j3wp_gg_",
|
|
28
|
+
"_onClick": "__onClick_3j3wp_gg_",
|
|
29
|
+
"__SBackground": "___SBackground_3j3wp_gg_",
|
|
30
|
+
"__SBarAnnotation": "___SBarAnnotation_3j3wp_gg_",
|
|
31
|
+
"__SBarLabel": "___SBarLabel_3j3wp_gg_",
|
|
32
|
+
"__SBarPercent": "___SBarPercent_3j3wp_gg_",
|
|
33
|
+
"__SBarValue": "___SBarValue_3j3wp_gg_",
|
|
34
|
+
"__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_3j3wp_gg_"
|
|
35
35
|
})
|
|
36
36
|
);
|
|
37
37
|
const MIN_HEIGHT = 2;
|
|
@@ -16,26 +16,26 @@ const style = (
|
|
|
16
16
|
/*__reshadow_css_start__*/
|
|
17
17
|
(sstyled.insert(
|
|
18
18
|
/*__inner_css_start__*/
|
|
19
|
-
".
|
|
19
|
+
".___SBar_3j3wp_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.58 .168 278.2));transition-property:height,width,y;transition-duration:var(--duration_3j3wp);transition-timing-function:ease-in-out}.___SBar_3j3wp_gg_.__color_3j3wp_gg_{fill:var(--color_3j3wp)}.___SBar_3j3wp_gg_.__pattern_3j3wp_gg_.__color_3j3wp_gg_{fill:var(--pattern_3j3wp);stroke:var(--color_3j3wp);stroke-width:1px}.___SBar_3j3wp_gg_.__hide_3j3wp_gg_{display:none}.___SBar_3j3wp_gg_.__transparent_3j3wp_gg_{opacity:.3}.___SBar_3j3wp_gg_.__onClick_3j3wp_gg_{cursor:pointer}.___SBackground_3j3wp_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg,oklch(.88 .002 175.6));opacity:.4}.___SBackground_3j3wp_gg_.__onClick_3j3wp_gg_{cursor:pointer}.___SBarAnnotation_3j3wp_gg_{display:flex;justify-content:space-between}.___SBarLabel_3j3wp_gg_{color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));margin-right:auto}.___SBarLabel_3j3wp_gg_,.___SBarPercent_3j3wp_gg_{font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,142%)}.___SBarPercent_3j3wp_gg_{color:var(--intergalactic-text-secondary,#00030095);margin-right:var(--intergalactic-spacing-2x,8px)}@media (color-gamut:p3){.___SBarPercent_3j3wp_gg_{color:var(--intergalactic-text-secondary,oklch(.088 .026 147.7/.583))}}.___SBarValue_3j3wp_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,142%);text-align:right}.___SCompactHorizontalBarHoverRect_3j3wp_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover,oklch(.177 .033 175.6/.028))}",
|
|
20
20
|
/*__inner_css_end__*/
|
|
21
|
-
"
|
|
21
|
+
"3j3wp_gg_"
|
|
22
22
|
), /*__reshadow_css_end__*/
|
|
23
23
|
{
|
|
24
|
-
"__SBar": "
|
|
25
|
-
"--duration": "--
|
|
26
|
-
"_color": "
|
|
27
|
-
"--color": "--
|
|
28
|
-
"_pattern": "
|
|
29
|
-
"--pattern": "--
|
|
30
|
-
"_hide": "
|
|
31
|
-
"_transparent": "
|
|
32
|
-
"_onClick": "
|
|
33
|
-
"__SBackground": "
|
|
34
|
-
"__SBarAnnotation": "
|
|
35
|
-
"__SBarLabel": "
|
|
36
|
-
"__SBarPercent": "
|
|
37
|
-
"__SBarValue": "
|
|
38
|
-
"__SCompactHorizontalBarHoverRect": "
|
|
24
|
+
"__SBar": "___SBar_3j3wp_gg_",
|
|
25
|
+
"--duration": "--duration_3j3wp",
|
|
26
|
+
"_color": "__color_3j3wp_gg_",
|
|
27
|
+
"--color": "--color_3j3wp",
|
|
28
|
+
"_pattern": "__pattern_3j3wp_gg_",
|
|
29
|
+
"--pattern": "--pattern_3j3wp",
|
|
30
|
+
"_hide": "__hide_3j3wp_gg_",
|
|
31
|
+
"_transparent": "__transparent_3j3wp_gg_",
|
|
32
|
+
"_onClick": "__onClick_3j3wp_gg_",
|
|
33
|
+
"__SBackground": "___SBackground_3j3wp_gg_",
|
|
34
|
+
"__SBarAnnotation": "___SBarAnnotation_3j3wp_gg_",
|
|
35
|
+
"__SBarLabel": "___SBarLabel_3j3wp_gg_",
|
|
36
|
+
"__SBarPercent": "___SBarPercent_3j3wp_gg_",
|
|
37
|
+
"__SBarValue": "___SBarValue_3j3wp_gg_",
|
|
38
|
+
"__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_3j3wp_gg_"
|
|
39
39
|
})
|
|
40
40
|
);
|
|
41
41
|
const MIN_WIDTH = 4;
|
|
@@ -11,26 +11,26 @@ const style = (
|
|
|
11
11
|
/*__reshadow_css_start__*/
|
|
12
12
|
(sstyled.insert(
|
|
13
13
|
/*__inner_css_start__*/
|
|
14
|
-
".
|
|
14
|
+
".___SBar_3j3wp_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.58 .168 278.2));transition-property:height,width,y;transition-duration:var(--duration_3j3wp);transition-timing-function:ease-in-out}.___SBar_3j3wp_gg_.__color_3j3wp_gg_{fill:var(--color_3j3wp)}.___SBar_3j3wp_gg_.__pattern_3j3wp_gg_.__color_3j3wp_gg_{fill:var(--pattern_3j3wp);stroke:var(--color_3j3wp);stroke-width:1px}.___SBar_3j3wp_gg_.__hide_3j3wp_gg_{display:none}.___SBar_3j3wp_gg_.__transparent_3j3wp_gg_{opacity:.3}.___SBar_3j3wp_gg_.__onClick_3j3wp_gg_{cursor:pointer}.___SBackground_3j3wp_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg,oklch(.88 .002 175.6));opacity:.4}.___SBackground_3j3wp_gg_.__onClick_3j3wp_gg_{cursor:pointer}.___SBarAnnotation_3j3wp_gg_{display:flex;justify-content:space-between}.___SBarLabel_3j3wp_gg_{color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));margin-right:auto}.___SBarLabel_3j3wp_gg_,.___SBarPercent_3j3wp_gg_{font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,142%)}.___SBarPercent_3j3wp_gg_{color:var(--intergalactic-text-secondary,#00030095);margin-right:var(--intergalactic-spacing-2x,8px)}@media (color-gamut:p3){.___SBarPercent_3j3wp_gg_{color:var(--intergalactic-text-secondary,oklch(.088 .026 147.7/.583))}}.___SBarValue_3j3wp_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,142%);text-align:right}.___SCompactHorizontalBarHoverRect_3j3wp_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover,oklch(.177 .033 175.6/.028))}",
|
|
15
15
|
/*__inner_css_end__*/
|
|
16
|
-
"
|
|
16
|
+
"3j3wp_gg_"
|
|
17
17
|
), /*__reshadow_css_end__*/
|
|
18
18
|
{
|
|
19
|
-
"__SBar": "
|
|
20
|
-
"--duration": "--
|
|
21
|
-
"_color": "
|
|
22
|
-
"--color": "--
|
|
23
|
-
"_pattern": "
|
|
24
|
-
"--pattern": "--
|
|
25
|
-
"_hide": "
|
|
26
|
-
"_transparent": "
|
|
27
|
-
"_onClick": "
|
|
28
|
-
"__SBackground": "
|
|
29
|
-
"__SBarAnnotation": "
|
|
30
|
-
"__SBarLabel": "
|
|
31
|
-
"__SBarPercent": "
|
|
32
|
-
"__SBarValue": "
|
|
33
|
-
"__SCompactHorizontalBarHoverRect": "
|
|
19
|
+
"__SBar": "___SBar_3j3wp_gg_",
|
|
20
|
+
"--duration": "--duration_3j3wp",
|
|
21
|
+
"_color": "__color_3j3wp_gg_",
|
|
22
|
+
"--color": "--color_3j3wp",
|
|
23
|
+
"_pattern": "__pattern_3j3wp_gg_",
|
|
24
|
+
"--pattern": "--pattern_3j3wp",
|
|
25
|
+
"_hide": "__hide_3j3wp_gg_",
|
|
26
|
+
"_transparent": "__transparent_3j3wp_gg_",
|
|
27
|
+
"_onClick": "__onClick_3j3wp_gg_",
|
|
28
|
+
"__SBackground": "___SBackground_3j3wp_gg_",
|
|
29
|
+
"__SBarAnnotation": "___SBarAnnotation_3j3wp_gg_",
|
|
30
|
+
"__SBarLabel": "___SBarLabel_3j3wp_gg_",
|
|
31
|
+
"__SBarPercent": "___SBarPercent_3j3wp_gg_",
|
|
32
|
+
"__SBarValue": "___SBarValue_3j3wp_gg_",
|
|
33
|
+
"__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_3j3wp_gg_"
|
|
34
34
|
})
|
|
35
35
|
);
|
|
36
36
|
const MIN_WIDTH = 2;
|
|
@@ -163,6 +163,17 @@ class CigaretteChartComponent extends AbstractChart {
|
|
|
163
163
|
} = this;
|
|
164
164
|
return scaleLinear([plotHeight, 0]);
|
|
165
165
|
}
|
|
166
|
+
get isNoData() {
|
|
167
|
+
const {
|
|
168
|
+
data
|
|
169
|
+
} = this.asProps;
|
|
170
|
+
const items = this.computeCigaretteItems();
|
|
171
|
+
const noData = items.every((item) => {
|
|
172
|
+
const value = data[item.id];
|
|
173
|
+
return value === interpolateValue || value === 0;
|
|
174
|
+
});
|
|
175
|
+
return noData;
|
|
176
|
+
}
|
|
166
177
|
renderChart() {
|
|
167
178
|
const {
|
|
168
179
|
invertAxis,
|
|
@@ -182,13 +193,36 @@ class CigaretteChartComponent extends AbstractChart {
|
|
|
182
193
|
} = this;
|
|
183
194
|
this.offset = 0;
|
|
184
195
|
const items = this.computeCigaretteItems();
|
|
185
|
-
|
|
196
|
+
if (this.isNoData) {
|
|
197
|
+
const height = invertAxis ? plotHeight - DEFAULT_GAP * 2 : plotWidth - DEFAULT_GAP * 2;
|
|
198
|
+
const width = Math.max(0, invertAxis ? plotWidth : plotHeight);
|
|
199
|
+
const y = DEFAULT_GAP;
|
|
200
|
+
const x = 0;
|
|
201
|
+
const r = height < 28 ? 2 : 4;
|
|
202
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("g", null, /* @__PURE__ */ React.createElement(Cigarette, {
|
|
203
|
+
key: "empty_cigarette",
|
|
204
|
+
index: 0,
|
|
205
|
+
y: invertAxis ? y : x,
|
|
206
|
+
x: invertAxis ? x : y,
|
|
207
|
+
width: invertAxis ? width : height,
|
|
208
|
+
height: invertAxis ? height : width,
|
|
209
|
+
uid,
|
|
210
|
+
hide: false,
|
|
211
|
+
duration,
|
|
212
|
+
r,
|
|
213
|
+
color: "--intergalactic-chart-palette-order-null",
|
|
214
|
+
patterns,
|
|
215
|
+
direction: invertAxis ? "horizontal" : "vertical",
|
|
216
|
+
hovered: false
|
|
217
|
+
})));
|
|
218
|
+
}
|
|
219
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("g", null, items.map((item, index) => {
|
|
186
220
|
const {
|
|
187
221
|
visualWidth,
|
|
188
222
|
id
|
|
189
223
|
} = item;
|
|
190
224
|
const value = data[id];
|
|
191
|
-
if (value === interpolateValue || value ===
|
|
225
|
+
if (value === interpolateValue || value === 0) {
|
|
192
226
|
return null;
|
|
193
227
|
}
|
|
194
228
|
const height = invertAxis ? plotHeight - DEFAULT_GAP * 2 : plotWidth - DEFAULT_GAP * 2;
|
|
@@ -201,7 +235,7 @@ class CigaretteChartComponent extends AbstractChart {
|
|
|
201
235
|
this.offset += DEFAULT_GAP;
|
|
202
236
|
}
|
|
203
237
|
return /* @__PURE__ */ React.createElement(Cigarette, {
|
|
204
|
-
key: item.id
|
|
238
|
+
key: `${item.id}_${index}_${items.length}`,
|
|
205
239
|
dataKey: item.id,
|
|
206
240
|
index,
|
|
207
241
|
y: invertAxis ? y : x,
|
|
@@ -211,14 +245,14 @@ class CigaretteChartComponent extends AbstractChart {
|
|
|
211
245
|
uid,
|
|
212
246
|
hide: !item.checked,
|
|
213
247
|
duration,
|
|
214
|
-
r
|
|
248
|
+
r,
|
|
215
249
|
color: item.color,
|
|
216
250
|
patterns,
|
|
217
251
|
direction: invertAxis ? "horizontal" : "vertical",
|
|
218
252
|
onClick,
|
|
219
253
|
hovered: highlightedLine === index ? true : highlightedLine === -1 ? void 0 : false
|
|
220
254
|
});
|
|
221
|
-
}), /* @__PURE__ */ React.createElement(AnimatedClipPath, {
|
|
255
|
+
})), /* @__PURE__ */ React.createElement(AnimatedClipPath, {
|
|
222
256
|
"aria-hidden": true,
|
|
223
257
|
duration,
|
|
224
258
|
id: uid,
|
|
@@ -245,7 +279,7 @@ class CigaretteChartComponent extends AbstractChart {
|
|
|
245
279
|
pY
|
|
246
280
|
} = this.state;
|
|
247
281
|
const STooltipChildrenWrapper = Box;
|
|
248
|
-
if (!showTooltip) {
|
|
282
|
+
if (!showTooltip || this.isNoData) {
|
|
249
283
|
return null;
|
|
250
284
|
}
|
|
251
285
|
return /* @__PURE__ */ React.createElement(HoverRect.Tooltip, {
|
|
@@ -38,12 +38,15 @@ class CigaretteBarRoot extends Component {
|
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
+
componentDidMount() {
|
|
42
|
+
this.forceUpdate();
|
|
43
|
+
}
|
|
41
44
|
uncontrolledProps() {
|
|
42
45
|
return {
|
|
43
46
|
hovered: false
|
|
44
47
|
};
|
|
45
48
|
}
|
|
46
|
-
|
|
49
|
+
getPath() {
|
|
47
50
|
const {
|
|
48
51
|
x,
|
|
49
52
|
y,
|
|
@@ -67,18 +70,12 @@ class CigaretteBarRoot extends Component {
|
|
|
67
70
|
widthV = widthV + 4;
|
|
68
71
|
}
|
|
69
72
|
if (radius) {
|
|
73
|
+
const hasPrev = Boolean(this.refElement.current?.previousSibling);
|
|
74
|
+
const hasNext = Boolean(this.refElement.current?.nextSibling);
|
|
70
75
|
if (direction === "horizontal") {
|
|
71
|
-
|
|
72
|
-
return roundedPath(xV, yV, widthV, heightV, radius, true, false, true, false);
|
|
73
|
-
} else {
|
|
74
|
-
return roundedPath(xV, yV, widthV, heightV, radius, false, true, false, true);
|
|
75
|
-
}
|
|
76
|
+
return roundedPath(xV, yV, widthV, heightV, radius, !hasPrev, !hasNext, !hasPrev, !hasNext);
|
|
76
77
|
} else {
|
|
77
|
-
|
|
78
|
-
return roundedPath(xV, yV, widthV, heightV, radius, true, true, false, false);
|
|
79
|
-
} else {
|
|
80
|
-
return roundedPath(xV, yV, widthV, heightV, radius, false, false, true, true);
|
|
81
|
-
}
|
|
78
|
+
return roundedPath(xV, yV, widthV, heightV, radius, !hasPrev, !hasPrev, !hasNext, !hasNext);
|
|
82
79
|
}
|
|
83
80
|
}
|
|
84
81
|
return roundedPath(xV, yV, widthV, heightV, radius);
|
|
@@ -101,7 +98,7 @@ class CigaretteBarRoot extends Component {
|
|
|
101
98
|
resolveColor,
|
|
102
99
|
patterns
|
|
103
100
|
} = this.asProps;
|
|
104
|
-
const dSvg = this.
|
|
101
|
+
const dSvg = this.getPath();
|
|
105
102
|
return /* @__PURE__ */ React.createElement(React.Fragment, {
|
|
106
103
|
key: `horizontal-bar-${index}`
|
|
107
104
|
}, (_ref = sstyled(styles), /* @__PURE__ */ React.createElement(SBar, _ref.cn("SBar", {
|
|
@@ -30,7 +30,8 @@ SBar[onClick] {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
SBackground {
|
|
33
|
-
fill: var(--intergalactic-chart-grid-bar-chart-base-bg, oklch(0.
|
|
33
|
+
fill: var(--intergalactic-chart-grid-bar-chart-base-bg, oklch(0.88 0.002 175.6));
|
|
34
|
+
opacity: 0.4;
|
|
34
35
|
}
|
|
35
36
|
SBackground[onClick] {
|
|
36
37
|
cursor: pointer;
|
|
@@ -59,7 +59,7 @@ export declare abstract class AbstractChart<Data extends ListData | ObjectData,
|
|
|
59
59
|
protected handleMouseEnter(id: string): void;
|
|
60
60
|
protected handleMouseLeave(): void;
|
|
61
61
|
protected resolveColor(id: string, index: number): string;
|
|
62
|
-
protected tooltipValueFormatter(value?: string | number | typeof interpolateValue | Date): string;
|
|
62
|
+
protected tooltipValueFormatter(value?: string | number | null | typeof interpolateValue | Date): string;
|
|
63
63
|
protected defaultLegendProps(): Partial<BaseLegendProps>;
|
|
64
64
|
protected renderLegend(): React.JSX.Element | null;
|
|
65
65
|
protected renderAxis(): React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractChart.d.ts","sourceRoot":"","sources":["../../../../src/component/Chart/AbstractChart.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,SAAS,EAAiB,MAAM,eAAe,CAAC;AAOzD,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;A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AC,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC;IAMxD,SAAS,CAAC,YAAY;IA0DtB,SAAS,CAAC,UAAU,IAAI,KAAK,CAAC,SAAS;IAyDvC,SAAS,CAAC,kBAAkB,CAAC,CAAC,SAAS,UAAU,EAAE,OAAO,EAAE;QAC1D,OAAO,EAAE,OAAO,SAAS,CAAC,SAAS,CAAC,GAAG,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;QACnE,QAAQ,EAAE,CAAC,CAAC;KACb;IAoCD,SAAS,CAAC,sBAAsB,CAAC,CAAC,SAAS,UAAU,EAAE,QAAQ,EAAE,CAAC;IAiB3D,MAAM;IA+Bb,OAAO,CAAC,YAAY;CAyCrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CigaretteChart.d.ts","sourceRoot":"","sources":["../../../../src/component/Chart/CigaretteChart.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAA8F,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"CigaretteChart.d.ts","sourceRoot":"","sources":["../../../../src/component/Chart/CigaretteChart.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAA8F,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAkiB5J;;;;GAIG;AACH,eAAO,MAAM,cAAc,oBAGD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cigarette.d.ts","sourceRoot":"","sources":["../../../../src/component/Cigarette/Cigarette.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Cigarette.d.ts","sourceRoot":"","sources":["../../../../src/component/Cigarette/Cigarette.tsx"],"names":[],"mappings":"AA4KA;;;;GAIG;;AACH,wBAA+C"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/d3-chart",
|
|
3
3
|
"description": "Semrush D3 Chart Component",
|
|
4
|
-
"version": "17.3.1-prerelease.
|
|
4
|
+
"version": "17.3.1-prerelease.11",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/esm/index.mjs",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@formatjs/intl": "4.1.13",
|
|
18
|
-
"@semcore/checkbox": "^17.2.1-prerelease.
|
|
19
|
-
"@semcore/divider": "^17.2.1-prerelease.
|
|
20
|
-
"@semcore/typography": "^17.2.1-prerelease.
|
|
18
|
+
"@semcore/checkbox": "^17.2.1-prerelease.11",
|
|
19
|
+
"@semcore/divider": "^17.2.1-prerelease.11",
|
|
20
|
+
"@semcore/typography": "^17.2.1-prerelease.11",
|
|
21
21
|
"@types/d3-shape": "3.1.7",
|
|
22
22
|
"@upsetjs/venn.js": "2.0.0",
|
|
23
23
|
"d3-array": "3.1.6",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"hoist-non-react-statics": "3.3.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@semcore/base-components": "^17.2.2",
|
|
35
|
-
"@semcore/icon": "^17.
|
|
34
|
+
"@semcore/base-components": "^17.2.2-prerelease.11",
|
|
35
|
+
"@semcore/icon": "^17.3.0-prerelease.11"
|
|
36
36
|
},
|
|
37
37
|
"repository": {
|
|
38
38
|
"type": "git",
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
"@types/d3-array": "^3.2.1",
|
|
45
45
|
"@types/d3-scale": "^4.0.9",
|
|
46
46
|
"@types/d3-transition": "^3.0.9",
|
|
47
|
-
"@semcore/
|
|
48
|
-
"@semcore/
|
|
49
|
-
"@semcore/button": "17.2.2-prerelease.
|
|
50
|
-
"@semcore/checkbox": "17.2.1-prerelease.
|
|
51
|
-
"@semcore/
|
|
52
|
-
"@semcore/
|
|
53
|
-
"@semcore/
|
|
54
|
-
"@semcore/icon": "17.
|
|
47
|
+
"@semcore/core": "17.3.1-prerelease.11",
|
|
48
|
+
"@semcore/base-components": "17.2.2-prerelease.11",
|
|
49
|
+
"@semcore/button": "17.2.2-prerelease.11",
|
|
50
|
+
"@semcore/checkbox": "17.2.1-prerelease.11",
|
|
51
|
+
"@semcore/ellipsis": "17.2.2-prerelease.11",
|
|
52
|
+
"@semcore/divider": "17.2.1-prerelease.11",
|
|
53
|
+
"@semcore/dropdown-menu": "17.3.1-prerelease.11",
|
|
54
|
+
"@semcore/icon": "17.3.0-prerelease.11",
|
|
55
55
|
"@semcore/testing-utils": "1.0.0",
|
|
56
|
-
"@semcore/typography": "17.2.1-prerelease.
|
|
56
|
+
"@semcore/typography": "17.2.1-prerelease.11"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "pnpm semcore-builder --source=js,ts && pnpm vite build"
|