@evergis/charts 2.0.21 → 2.0.22
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.
|
@@ -54,16 +54,8 @@ function _taggedTemplateLiteralLoose(strings, raw) {
|
|
|
54
54
|
return strings;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
_templateObject = function _templateObject() {
|
|
61
|
-
return data;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
return data;
|
|
65
|
-
}
|
|
66
|
-
const Wrapper = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject());
|
|
57
|
+
var _templateObject;
|
|
58
|
+
const Wrapper = /*#__PURE__*/styled__default.div(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n width: 100%;\n box-sizing: border-box;\n"])));
|
|
67
59
|
|
|
68
60
|
function useNode() {
|
|
69
61
|
const [node, onSetNode] = React.useState(null);
|
|
@@ -101,16 +93,8 @@ const appendSvg = (node, width, height) => {
|
|
|
101
93
|
return svg;
|
|
102
94
|
};
|
|
103
95
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
_templateObject$1 = function _templateObject() {
|
|
108
|
-
return data;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
return data;
|
|
112
|
-
}
|
|
113
|
-
const SwipeScrollContainer = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject$1());
|
|
96
|
+
var _templateObject$1;
|
|
97
|
+
const SwipeScrollContainer = /*#__PURE__*/styled__default.div(_templateObject$1 || (_templateObject$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n overflow: hidden;\n user-select: none;\n"])));
|
|
114
98
|
|
|
115
99
|
function animate(_ref) {
|
|
116
100
|
let {
|
|
@@ -257,13 +241,14 @@ const useSwipe = (node, _ref) => {
|
|
|
257
241
|
}, [container, onStart, node, width]);
|
|
258
242
|
};
|
|
259
243
|
|
|
244
|
+
const _excluded = ["children", "width", "onSwipe"];
|
|
260
245
|
const SwipeScroll = (_ref) => {
|
|
261
246
|
let {
|
|
262
247
|
children,
|
|
263
248
|
width,
|
|
264
249
|
onSwipe
|
|
265
250
|
} = _ref,
|
|
266
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
251
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
267
252
|
|
|
268
253
|
const [ref, draggingNode] = useNode();
|
|
269
254
|
useSwipe(draggingNode, _extends({
|
|
@@ -299,15 +284,7 @@ const getTextAnchor = (index, length) => {
|
|
|
299
284
|
return 'end';
|
|
300
285
|
};
|
|
301
286
|
|
|
302
|
-
|
|
303
|
-
const data = _taggedTemplateLiteralLoose(["\n position: absolute;\n"]);
|
|
304
|
-
|
|
305
|
-
_templateObject$2 = function _templateObject() {
|
|
306
|
-
return data;
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
return data;
|
|
310
|
-
}
|
|
287
|
+
var _templateObject$2;
|
|
311
288
|
|
|
312
289
|
const getTranslate = (_ref) => {
|
|
313
290
|
let {
|
|
@@ -334,7 +311,7 @@ const LabelContainer = /*#__PURE__*/styled__default.div.attrs(props => ({
|
|
|
334
311
|
style: {
|
|
335
312
|
transform: getTranslate(props)
|
|
336
313
|
}
|
|
337
|
-
}))( /*#__PURE__*/
|
|
314
|
+
}))(_templateObject$2 || (_templateObject$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n"])));
|
|
338
315
|
|
|
339
316
|
const labelClassName = 'd3-chart-label';
|
|
340
317
|
const drawRadialLabels = (_ref) => {
|
|
@@ -388,65 +365,7 @@ const drawRadialLabels = (_ref) => {
|
|
|
388
365
|
});
|
|
389
366
|
};
|
|
390
367
|
|
|
391
|
-
|
|
392
|
-
const data = _taggedTemplateLiteralLoose(["\n margin-left: 4px;\n font-size: 10px;\n color: rgba(255, 255, 255, 0.54);\n"]);
|
|
393
|
-
|
|
394
|
-
_templateObject6 = function _templateObject6() {
|
|
395
|
-
return data;
|
|
396
|
-
};
|
|
397
|
-
|
|
398
|
-
return data;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
function _templateObject5() {
|
|
402
|
-
const data = _taggedTemplateLiteralLoose(["\n ", "\n"]);
|
|
403
|
-
|
|
404
|
-
_templateObject5 = function _templateObject5() {
|
|
405
|
-
return data;
|
|
406
|
-
};
|
|
407
|
-
|
|
408
|
-
return data;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
function _templateObject4() {
|
|
412
|
-
const data = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 2px 4px;\n border-radius: 4px;\n color: rgb(255, 255, 255);\n background-color: rgb(144, 197, 61);\n margin-left: 8px;\n"]);
|
|
413
|
-
|
|
414
|
-
_templateObject4 = function _templateObject4() {
|
|
415
|
-
return data;
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
return data;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
function _templateObject3() {
|
|
422
|
-
const data = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 50%;\n right: 0;\n transform: translate(calc(100% + 6px), -50%);\n"]);
|
|
423
|
-
|
|
424
|
-
_templateObject3 = function _templateObject3() {
|
|
425
|
-
return data;
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
return data;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
function _templateObject2() {
|
|
432
|
-
const data = _taggedTemplateLiteralLoose(["\n text-align: center;\n max-width: 120px;\n"]);
|
|
433
|
-
|
|
434
|
-
_templateObject2 = function _templateObject2() {
|
|
435
|
-
return data;
|
|
436
|
-
};
|
|
437
|
-
|
|
438
|
-
return data;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
function _templateObject$3() {
|
|
442
|
-
const data = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: 12px;\n"]);
|
|
443
|
-
|
|
444
|
-
_templateObject$3 = function _templateObject() {
|
|
445
|
-
return data;
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
return data;
|
|
449
|
-
}
|
|
368
|
+
var _templateObject$3, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
450
369
|
const getTranslate$1 = (_ref) => {
|
|
451
370
|
let {
|
|
452
371
|
anchor,
|
|
@@ -467,22 +386,14 @@ const getTranslate$1 = (_ref) => {
|
|
|
467
386
|
|
|
468
387
|
return "translate(" + translateX + "px, " + translateY + "px)";
|
|
469
388
|
};
|
|
470
|
-
const Label = /*#__PURE__*/styled__default.div( /*#__PURE__*/
|
|
471
|
-
const Name = /*#__PURE__*/styled__default.div( /*#__PURE__*/
|
|
472
|
-
const middleBadgeStyles = /*#__PURE__*/styled.css( /*#__PURE__*/
|
|
473
|
-
const DefaultBadge = /*#__PURE__*/styled__default.div( /*#__PURE__*/
|
|
474
|
-
const MiddleBadge = /*#__PURE__*/styled__default(DefaultBadge)( /*#__PURE__*/
|
|
475
|
-
const BadgePrefix = /*#__PURE__*/styled__default.div( /*#__PURE__*/
|
|
476
|
-
|
|
477
|
-
function _templateObject$4() {
|
|
478
|
-
const data = _taggedTemplateLiteralLoose(["\n .", " {\n path,\n line,\n circle {\n fill: none;\n stroke-width: 1px;\n stroke: rgba(149, 149, 149, 0.18);\n }\n }\n .", " {\n font-size: 12px;\n fill-opacity: 0.56;\n }\n .", " {\n fill-opacity: 0.06;\n stroke-width: 2px;\n fill: rgb(144, 197, 61);\n stroke: rgb(144, 197, 61);\n }\n .", " {\n fill: rgb(144, 197, 61);\n }\n"]);
|
|
389
|
+
const Label = /*#__PURE__*/styled__default.div(_templateObject$3 || (_templateObject$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: 12px;\n"])));
|
|
390
|
+
const Name = /*#__PURE__*/styled__default.div(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n text-align: center;\n max-width: 120px;\n"])));
|
|
391
|
+
const middleBadgeStyles = /*#__PURE__*/styled.css(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n top: 50%;\n right: 0;\n transform: translate(calc(100% + 6px), -50%);\n"])));
|
|
392
|
+
const DefaultBadge = /*#__PURE__*/styled__default.div(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 2px 4px;\n border-radius: 4px;\n color: rgb(255, 255, 255);\n background-color: rgb(144, 197, 61);\n margin-left: 8px;\n"])));
|
|
393
|
+
const MiddleBadge = /*#__PURE__*/styled__default(DefaultBadge)(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), middleBadgeStyles);
|
|
394
|
+
const BadgePrefix = /*#__PURE__*/styled__default.div(_templateObject6 || (_templateObject6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-left: 4px;\n font-size: 10px;\n color: rgba(255, 255, 255, 0.54);\n"])));
|
|
479
395
|
|
|
480
|
-
|
|
481
|
-
return data;
|
|
482
|
-
};
|
|
483
|
-
|
|
484
|
-
return data;
|
|
485
|
-
}
|
|
396
|
+
var _templateObject$4;
|
|
486
397
|
const radarChartclassNames = {
|
|
487
398
|
radar: 'radar',
|
|
488
399
|
radarAxis: 'radarAxis',
|
|
@@ -495,7 +406,7 @@ const radarChartclassNames = {
|
|
|
495
406
|
radarLabelBadgePrefix: 'radarLabelBadgePrefix',
|
|
496
407
|
radarCircle: 'radarCircle'
|
|
497
408
|
};
|
|
498
|
-
const SvgWrapper = /*#__PURE__*/styled__default(Wrapper)( /*#__PURE__*/
|
|
409
|
+
const SvgWrapper = /*#__PURE__*/styled__default(Wrapper)(_templateObject$4 || (_templateObject$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .", " {\n path,\n line,\n circle {\n fill: none;\n stroke-width: 1px;\n stroke: rgba(149, 149, 149, 0.18);\n }\n }\n .", " {\n font-size: 12px;\n fill-opacity: 0.56;\n }\n .", " {\n fill-opacity: 0.06;\n stroke-width: 2px;\n fill: rgb(144, 197, 61);\n stroke: rgb(144, 197, 61);\n }\n .", " {\n fill: rgb(144, 197, 61);\n }\n"])), radarChartclassNames.radarAxis, radarChartclassNames.radarAxisText, radarChartclassNames.radarPolygon, radarChartclassNames.radarCircle);
|
|
499
410
|
|
|
500
411
|
const draw = (node, props) => {
|
|
501
412
|
const {
|
|
@@ -725,15 +636,7 @@ function degreesToRadians(degrees) {
|
|
|
725
636
|
return degrees * (Math.PI / flatAngle);
|
|
726
637
|
}
|
|
727
638
|
|
|
728
|
-
|
|
729
|
-
const data = _taggedTemplateLiteralLoose(["\n .", " {\n fill: #4a4a4a;\n }\n .", " {\n position: absolute;\n max-width: 128px;\n }\n .", " {\n stroke: #000;\n }\n .", " {\n fill: transparent;\n cursor: pointer;\n }\n"]);
|
|
730
|
-
|
|
731
|
-
_templateObject$5 = function _templateObject() {
|
|
732
|
-
return data;
|
|
733
|
-
};
|
|
734
|
-
|
|
735
|
-
return data;
|
|
736
|
-
}
|
|
639
|
+
var _templateObject$5;
|
|
737
640
|
const pieChartclassNames = {
|
|
738
641
|
pieGlobal: 'pieGlobal',
|
|
739
642
|
pieSlice: 'pieSlice',
|
|
@@ -751,7 +654,7 @@ const pieChartclassNames = {
|
|
|
751
654
|
pieTooltipColorBox: 'pieTooltipColorBox',
|
|
752
655
|
pieFullChartTooltipCircle: 'pieFullChartTooltipCircle'
|
|
753
656
|
};
|
|
754
|
-
const SvgWrapper$1 = /*#__PURE__*/styled__default(Wrapper)( /*#__PURE__*/
|
|
657
|
+
const SvgWrapper$1 = /*#__PURE__*/styled__default(Wrapper)(_templateObject$5 || (_templateObject$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .", " {\n fill: #4a4a4a;\n }\n .", " {\n position: absolute;\n max-width: 128px;\n }\n .", " {\n stroke: #000;\n }\n .", " {\n fill: transparent;\n cursor: pointer;\n }\n"])), pieChartclassNames.pieSliceLabel, pieChartclassNames.pieRadialLabel, pieChartclassNames.pieRadialLink, pieChartclassNames.pieFullChartTooltipCircle);
|
|
755
658
|
|
|
756
659
|
const getMidFactor = d => d.startAngle + (d.endAngle - d.startAngle) / 2 < Math.PI ? 1 : -1;
|
|
757
660
|
const getAlign = d => {
|
|
@@ -815,159 +718,21 @@ const drawRadialLabels$1 = (_ref) => {
|
|
|
815
718
|
}
|
|
816
719
|
};
|
|
817
720
|
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
};
|
|
834
|
-
|
|
835
|
-
return data;
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
function _templateObject12() {
|
|
839
|
-
const data = _taggedTemplateLiteralLoose(["\n position: relative;\n font-size: 11px;\n color: #fff;\n font-weight: bold;\n letter-spacing: 0.52px;\n"]);
|
|
840
|
-
|
|
841
|
-
_templateObject12 = function _templateObject12() {
|
|
842
|
-
return data;
|
|
843
|
-
};
|
|
844
|
-
|
|
845
|
-
return data;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
function _templateObject11() {
|
|
849
|
-
const data = _taggedTemplateLiteralLoose(["\n text-align: right;\n flex-shrink: 0;\n flex-grow: 1;\n"]);
|
|
850
|
-
|
|
851
|
-
_templateObject11 = function _templateObject11() {
|
|
852
|
-
return data;
|
|
853
|
-
};
|
|
854
|
-
|
|
855
|
-
return data;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
function _templateObject10() {
|
|
859
|
-
const data = _taggedTemplateLiteralLoose(["\n margin-right: 4px;\n"]);
|
|
860
|
-
|
|
861
|
-
_templateObject10 = function _templateObject10() {
|
|
862
|
-
return data;
|
|
863
|
-
};
|
|
864
|
-
|
|
865
|
-
return data;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
function _templateObject9() {
|
|
869
|
-
const data = _taggedTemplateLiteralLoose(["\n height: 2px;\n border-radius: 0;\n"]);
|
|
870
|
-
|
|
871
|
-
_templateObject9 = function _templateObject9() {
|
|
872
|
-
return data;
|
|
873
|
-
};
|
|
874
|
-
|
|
875
|
-
return data;
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
function _templateObject8() {
|
|
879
|
-
const data = _taggedTemplateLiteralLoose(["\n margin-right: 4px;\n width: 10px;\n height: 10px;\n border-radius: 2px;\n"]);
|
|
880
|
-
|
|
881
|
-
_templateObject8 = function _templateObject8() {
|
|
882
|
-
return data;
|
|
883
|
-
};
|
|
884
|
-
|
|
885
|
-
return data;
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
function _templateObject7() {
|
|
889
|
-
const data = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-right: 4px;\n"]);
|
|
890
|
-
|
|
891
|
-
_templateObject7 = function _templateObject7() {
|
|
892
|
-
return data;
|
|
893
|
-
};
|
|
894
|
-
|
|
895
|
-
return data;
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
function _templateObject6$1() {
|
|
899
|
-
const data = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-bottom: 0.25rem;\n &:last-of-type {\n margin-bottom: 0;\n }\n"]);
|
|
900
|
-
|
|
901
|
-
_templateObject6$1 = function _templateObject6() {
|
|
902
|
-
return data;
|
|
903
|
-
};
|
|
904
|
-
|
|
905
|
-
return data;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
function _templateObject5$1() {
|
|
909
|
-
const data = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n margin-bottom: 6px;\n"]);
|
|
910
|
-
|
|
911
|
-
_templateObject5$1 = function _templateObject5() {
|
|
912
|
-
return data;
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
return data;
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
function _templateObject4$1() {
|
|
919
|
-
const data = _taggedTemplateLiteralLoose(["\n position: relative;\n font-size: 11px;\n color: #fff;\n margin-bottom: 8px;\n padding: 4px 6px;\n background-color: rgba(48, 69, 79, 1);\n border-radius: 4px;\n box-shadow: 0 0.1875rem 0.5rem rgba(48, 69, 79, 0.06);\n :before {\n content: '';\n position: absolute;\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 100%);\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 4px 3px 0 3px;\n border-color: rgba(48, 69, 79, 1) transparent transparent transparent;\n }\n"]);
|
|
920
|
-
|
|
921
|
-
_templateObject4$1 = function _templateObject4() {
|
|
922
|
-
return data;
|
|
923
|
-
};
|
|
924
|
-
|
|
925
|
-
return data;
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
function _templateObject3$1() {
|
|
929
|
-
const data = _taggedTemplateLiteralLoose(["\n align-items: center;\n"]);
|
|
930
|
-
|
|
931
|
-
_templateObject3$1 = function _templateObject3() {
|
|
932
|
-
return data;
|
|
933
|
-
};
|
|
934
|
-
|
|
935
|
-
return data;
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
function _templateObject2$1() {
|
|
939
|
-
const data = _taggedTemplateLiteralLoose([""]);
|
|
940
|
-
|
|
941
|
-
_templateObject2$1 = function _templateObject2() {
|
|
942
|
-
return data;
|
|
943
|
-
};
|
|
944
|
-
|
|
945
|
-
return data;
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
function _templateObject$6() {
|
|
949
|
-
const data = _taggedTemplateLiteralLoose(["\n width: 0;\n height: 0;\n display: flex;\n align-items: flex-end;\n justify-content: center;\n pointer-events: none;\n white-space: nowrap;\n"]);
|
|
950
|
-
|
|
951
|
-
_templateObject$6 = function _templateObject() {
|
|
952
|
-
return data;
|
|
953
|
-
};
|
|
954
|
-
|
|
955
|
-
return data;
|
|
956
|
-
}
|
|
957
|
-
const TooltipFlex = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject$6());
|
|
958
|
-
const LabelFlex = /*#__PURE__*/styled__default(TooltipFlex)( /*#__PURE__*/_templateObject2$1());
|
|
959
|
-
const LabelFlexCenter = /*#__PURE__*/styled__default(LabelFlex)( /*#__PURE__*/_templateObject3$1());
|
|
960
|
-
const TooltipContainer = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject4$1());
|
|
961
|
-
const TooltipGroupName = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject5$1());
|
|
962
|
-
const TooltipItem = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject6$1());
|
|
963
|
-
const ColFlex = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject7());
|
|
964
|
-
const ColorBox = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject8());
|
|
965
|
-
const ColorLine = /*#__PURE__*/styled__default(ColorBox)( /*#__PURE__*/_templateObject9());
|
|
966
|
-
const Name$1 = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject10());
|
|
967
|
-
const Value = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject11());
|
|
968
|
-
const Label$1 = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject12());
|
|
969
|
-
const LabelTop = /*#__PURE__*/styled__default(Label$1)( /*#__PURE__*/_templateObject13());
|
|
970
|
-
const LabelBottom = /*#__PURE__*/styled__default(Label$1)( /*#__PURE__*/_templateObject14());
|
|
721
|
+
var _templateObject$6, _templateObject2$1, _templateObject3$1, _templateObject4$1, _templateObject5$1, _templateObject6$1, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
722
|
+
const TooltipFlex = /*#__PURE__*/styled__default.div(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 0;\n height: 0;\n display: flex;\n align-items: flex-end;\n justify-content: center;\n pointer-events: none;\n white-space: nowrap;\n"])));
|
|
723
|
+
const LabelFlex = /*#__PURE__*/styled__default(TooltipFlex)(_templateObject2$1 || (_templateObject2$1 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
724
|
+
const LabelFlexCenter = /*#__PURE__*/styled__default(LabelFlex)(_templateObject3$1 || (_templateObject3$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n align-items: center;\n"])));
|
|
725
|
+
const TooltipContainer = /*#__PURE__*/styled__default.div(_templateObject4$1 || (_templateObject4$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n font-size: 11px;\n color: #fff;\n margin-bottom: 8px;\n padding: 4px 6px;\n background-color: rgba(48, 69, 79, 1);\n border-radius: 4px;\n box-shadow: 0 0.1875rem 0.5rem rgba(48, 69, 79, 0.06);\n :before {\n content: '';\n position: absolute;\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 100%);\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 4px 3px 0 3px;\n border-color: rgba(48, 69, 79, 1) transparent transparent transparent;\n }\n"])));
|
|
726
|
+
const TooltipGroupName = /*#__PURE__*/styled__default.div(_templateObject5$1 || (_templateObject5$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 14px;\n margin-bottom: 6px;\n"])));
|
|
727
|
+
const TooltipItem = /*#__PURE__*/styled__default.div(_templateObject6$1 || (_templateObject6$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-bottom: 0.25rem;\n &:last-of-type {\n margin-bottom: 0;\n }\n"])));
|
|
728
|
+
const ColFlex = /*#__PURE__*/styled__default.div(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-right: 4px;\n"])));
|
|
729
|
+
const ColorBox = /*#__PURE__*/styled__default.div(_templateObject8 || (_templateObject8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-right: 4px;\n width: 10px;\n height: 10px;\n border-radius: 2px;\n"])));
|
|
730
|
+
const ColorLine = /*#__PURE__*/styled__default(ColorBox)(_templateObject9 || (_templateObject9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 2px;\n border-radius: 0;\n"])));
|
|
731
|
+
const Name$1 = /*#__PURE__*/styled__default.div(_templateObject10 || (_templateObject10 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-right: 4px;\n"])));
|
|
732
|
+
const Value = /*#__PURE__*/styled__default.div(_templateObject11 || (_templateObject11 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n text-align: right;\n flex-shrink: 0;\n flex-grow: 1;\n"])));
|
|
733
|
+
const Label$1 = /*#__PURE__*/styled__default.div(_templateObject12 || (_templateObject12 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n font-size: 11px;\n color: #fff;\n font-weight: bold;\n letter-spacing: 0.52px;\n"])));
|
|
734
|
+
const LabelTop = /*#__PURE__*/styled__default(Label$1)(_templateObject13 || (_templateObject13 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n top: 6px;\n"])));
|
|
735
|
+
const LabelBottom = /*#__PURE__*/styled__default(Label$1)(_templateObject14 || (_templateObject14 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n bottom: 6px;\n"])));
|
|
971
736
|
|
|
972
737
|
const drawTooltip = (_ref) => {
|
|
973
738
|
let {
|
|
@@ -1364,15 +1129,7 @@ const getLegend = (_ref) => {
|
|
|
1364
1129
|
return svg;
|
|
1365
1130
|
};
|
|
1366
1131
|
|
|
1367
|
-
|
|
1368
|
-
const data = _taggedTemplateLiteralLoose(["\n .", " {\n display: flex;\n margin-bottom: 16px;\n }\n .", " {\n display: inline-flex;\n align-items: flex-end;\n height: ", ";\n margin-bottom: 4px;\n font-weight: bold;\n }\n .", " {\n height: ", ";\n margin-bottom: 4px;\n position: relative;\n display: flex;\n }\n .", " {\n font-size: 14px;\n bottom: 0;\n position: absolute;\n }\n .", " {\n display: flex;\n flex-direction: column;\n margin-right: 10px;\n }\n .", " {\n font-size: 12px;\n display: inline-flex;\n align-items: center;\n justify-content: flex-end;\n }\n .", " {\n position: relative;\n }\n .", " {\n position: absolute;\n }\n"]);
|
|
1369
|
-
|
|
1370
|
-
_templateObject$7 = function _templateObject() {
|
|
1371
|
-
return data;
|
|
1372
|
-
};
|
|
1373
|
-
|
|
1374
|
-
return data;
|
|
1375
|
-
}
|
|
1132
|
+
var _templateObject$7;
|
|
1376
1133
|
const calendarChartClassNames = /*#__PURE__*/_extends({
|
|
1377
1134
|
calendarChart: 'calendarChart',
|
|
1378
1135
|
calendarYear: 'calendarYear',
|
|
@@ -1386,7 +1143,7 @@ const calendarChartClassNames = /*#__PURE__*/_extends({
|
|
|
1386
1143
|
calendarDay: 'calendarDay'
|
|
1387
1144
|
}, legendClassNames);
|
|
1388
1145
|
const headerHeight = '20px';
|
|
1389
|
-
const SvgWrapper$2 = /*#__PURE__*/styled__default(Wrapper)( /*#__PURE__*/
|
|
1146
|
+
const SvgWrapper$2 = /*#__PURE__*/styled__default(Wrapper)(_templateObject$7 || (_templateObject$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .", " {\n display: flex;\n margin-bottom: 16px;\n }\n .", " {\n display: inline-flex;\n align-items: flex-end;\n height: ", ";\n margin-bottom: 4px;\n font-weight: bold;\n }\n .", " {\n height: ", ";\n margin-bottom: 4px;\n position: relative;\n display: flex;\n }\n .", " {\n font-size: 14px;\n bottom: 0;\n position: absolute;\n }\n .", " {\n display: flex;\n flex-direction: column;\n margin-right: 10px;\n }\n .", " {\n font-size: 12px;\n display: inline-flex;\n align-items: center;\n justify-content: flex-end;\n }\n .", " {\n position: relative;\n }\n .", " {\n position: absolute;\n }\n"])), calendarChartClassNames.calendarYear, calendarChartClassNames.calendarYearTitle, headerHeight, calendarChartClassNames.calendarHeader, headerHeight, calendarChartClassNames.calendarMonth, calendarChartClassNames.calendarAxis, calendarChartClassNames.calendarWeekDay, calendarChartClassNames.calendarDays, calendarChartClassNames.calendarDay);
|
|
1390
1147
|
|
|
1391
1148
|
const draw$2 = (node, props) => {
|
|
1392
1149
|
const {
|
|
@@ -1569,25 +1326,7 @@ const stackedData = data => {
|
|
|
1569
1326
|
});
|
|
1570
1327
|
};
|
|
1571
1328
|
|
|
1572
|
-
|
|
1573
|
-
const data = _taggedTemplateLiteralLoose(["\n .", " {\n transition: opacity linear 200ms;\n z-index: 1;\n .", " {\n justify-content: flex-start;\n align-items: center;\n pointer-events: none;\n }\n .", " {\n margin: 0 0 0 10px;\n }\n }\n"]);
|
|
1574
|
-
|
|
1575
|
-
_templateObject2$2 = function _templateObject2() {
|
|
1576
|
-
return data;
|
|
1577
|
-
};
|
|
1578
|
-
|
|
1579
|
-
return data;
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
function _templateObject$8() {
|
|
1583
|
-
const data = _taggedTemplateLiteralLoose(["\n .", ",\n .", ",\n .", " {\n shape-rendering: crispEdges;\n }\n .", " {\n fill: none;\n stroke: steelblue;\n stroke-width: 1.5px;\n stroke-linejoin: round;\n stroke-linecap: round;\n }\n .", " {\n fill-opacity: 0.24;\n }\n .", ",\n .", ",\n .", " {\n stroke: rgba(149, 149, 149, 0.24);\n }\n .", ",\n .", " {\n transition: opacity linear 200ms;\n pointer-events: none;\n stroke-width: 1px;\n }\n .", " {\n stroke: #fff;\n stroke-width: 2px;\n }\n .", " {\n shape-rendering: crispEdges;\n }\n .", " {\n fill: none;\n pointer-events: all;\n }\n"]);
|
|
1584
|
-
|
|
1585
|
-
_templateObject$8 = function _templateObject() {
|
|
1586
|
-
return data;
|
|
1587
|
-
};
|
|
1588
|
-
|
|
1589
|
-
return data;
|
|
1590
|
-
}
|
|
1329
|
+
var _templateObject$8, _templateObject2$2;
|
|
1591
1330
|
const lineChartClassNames = {
|
|
1592
1331
|
lineChartYScaleGlobal: 'lineChartYScaleGlobal',
|
|
1593
1332
|
lineChartXScaleGlobal: 'lineChartXScaleGlobal',
|
|
@@ -1611,8 +1350,8 @@ const lineChartClassNames = {
|
|
|
1611
1350
|
lineChartMouseLabelContainer: 'lineChartMouseLabelContainer',
|
|
1612
1351
|
lineChartMouseLabel: 'lineChartMouseLabel'
|
|
1613
1352
|
};
|
|
1614
|
-
const SvgWrapper$3 = /*#__PURE__*/styled__default(Wrapper)( /*#__PURE__*/
|
|
1615
|
-
const TooltipStyles = /*#__PURE__*/styled.createGlobalStyle( /*#__PURE__*/
|
|
1353
|
+
const SvgWrapper$3 = /*#__PURE__*/styled__default(Wrapper)(_templateObject$8 || (_templateObject$8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .", ",\n .", ",\n .", " {\n shape-rendering: crispEdges;\n }\n .", " {\n fill: none;\n stroke: steelblue;\n stroke-width: 1.5px;\n stroke-linejoin: round;\n stroke-linecap: round;\n }\n .", " {\n fill-opacity: 0.24;\n }\n .", ",\n .", ",\n .", " {\n stroke: rgba(149, 149, 149, 0.24);\n }\n .", ",\n .", " {\n transition: opacity linear 200ms;\n pointer-events: none;\n stroke-width: 1px;\n }\n .", " {\n stroke: #fff;\n stroke-width: 2px;\n }\n .", " {\n shape-rendering: crispEdges;\n }\n .", " {\n fill: none;\n pointer-events: all;\n }\n"])), lineChartClassNames.lineChartYScaleGlobal, lineChartClassNames.lineChartXScaleGlobal, lineChartClassNames.lineChartGridGlobal, lineChartClassNames.lineChartLinesGlobal, lineChartClassNames.lineChartArea, lineChartClassNames.lineChartGridLineX, lineChartClassNames.lineChartGridLineY, lineChartClassNames.lineChartMouseLine, lineChartClassNames.lineChartMouseLine, lineChartClassNames.lineChartMouseCircle, lineChartClassNames.lineChartDot, lineChartClassNames.lineChartMouseLine, lineChartClassNames.lineChartMouseRect);
|
|
1354
|
+
const TooltipStyles = /*#__PURE__*/styled.createGlobalStyle(_templateObject2$2 || (_templateObject2$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .", " {\n transition: opacity linear 200ms;\n z-index: 1;\n .", " {\n justify-content: flex-start;\n align-items: center;\n pointer-events: none;\n }\n .", " {\n margin: 0 0 0 10px;\n }\n }\n"])), lineChartClassNames.lineChartMouseLabel, lineChartClassNames.lineChartLabelFlex, lineChartClassNames.lineChartLabel);
|
|
1616
1355
|
|
|
1617
1356
|
const drawGrid = (_ref) => {
|
|
1618
1357
|
let {
|
|
@@ -1639,27 +1378,9 @@ const drawGrid = (_ref) => {
|
|
|
1639
1378
|
}
|
|
1640
1379
|
};
|
|
1641
1380
|
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
_templateObject2$3 = function _templateObject2() {
|
|
1646
|
-
return data;
|
|
1647
|
-
};
|
|
1648
|
-
|
|
1649
|
-
return data;
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
function _templateObject$9() {
|
|
1653
|
-
const data = _taggedTemplateLiteralLoose(["\n width: 0;\n height: 0;\n display: flex;\n align-items: flex-end;\n justify-content: center;\n font-size: 12px;\n white-space: nowrap;\n"]);
|
|
1654
|
-
|
|
1655
|
-
_templateObject$9 = function _templateObject() {
|
|
1656
|
-
return data;
|
|
1657
|
-
};
|
|
1658
|
-
|
|
1659
|
-
return data;
|
|
1660
|
-
}
|
|
1661
|
-
const LabelContainer$1 = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject$9());
|
|
1662
|
-
const Label$2 = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject2$3());
|
|
1381
|
+
var _templateObject$9, _templateObject2$3;
|
|
1382
|
+
const LabelContainer$1 = /*#__PURE__*/styled__default.div(_templateObject$9 || (_templateObject$9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 0;\n height: 0;\n display: flex;\n align-items: flex-end;\n justify-content: center;\n font-size: 12px;\n white-space: nowrap;\n"])));
|
|
1383
|
+
const Label$2 = /*#__PURE__*/styled__default.div(_templateObject2$3 || (_templateObject2$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 4px;\n"])));
|
|
1663
1384
|
|
|
1664
1385
|
const labelClassName$1 = 'd3-chart-label';
|
|
1665
1386
|
const drawLabel = (_ref) => {
|
|
@@ -1690,6 +1411,7 @@ const drawLabel = (_ref) => {
|
|
|
1690
1411
|
});
|
|
1691
1412
|
};
|
|
1692
1413
|
|
|
1414
|
+
const _excluded$1 = ["values"];
|
|
1693
1415
|
const drawTooltip$1 = (_ref) => {
|
|
1694
1416
|
let {
|
|
1695
1417
|
svg,
|
|
@@ -1806,7 +1528,7 @@ const drawTooltip$1 = (_ref) => {
|
|
|
1806
1528
|
let {
|
|
1807
1529
|
values
|
|
1808
1530
|
} = _ref7,
|
|
1809
|
-
rest = _objectWithoutPropertiesLoose(_ref7,
|
|
1531
|
+
rest = _objectWithoutPropertiesLoose(_ref7, _excluded$1);
|
|
1810
1532
|
|
|
1811
1533
|
return _extends({}, rest, {
|
|
1812
1534
|
value: getValue(values),
|
|
@@ -2177,7 +1899,7 @@ const drawLines = (_ref) => {
|
|
|
2177
1899
|
let linesSelection = null;
|
|
2178
1900
|
let areasSelection = null;
|
|
2179
1901
|
let area = null;
|
|
2180
|
-
const line = d3.line().defined(d => d !== null).x((_, index) => xScale(index
|
|
1902
|
+
const line = d3.line().defined(d => d !== null).x((_, index) => xScale(index) + bandwidth / 2) // @ts-ignore
|
|
2181
1903
|
.y(d => yScale(d)).curve(curve || d3.curveLinear);
|
|
2182
1904
|
const bandwidth = xScale.bandwidth();
|
|
2183
1905
|
const linesData = lineData.filter((_ref2) => {
|
|
@@ -2209,7 +1931,7 @@ const drawLines = (_ref) => {
|
|
|
2209
1931
|
|
|
2210
1932
|
if (areasData.length > 0) {
|
|
2211
1933
|
let dataIndex = -2;
|
|
2212
|
-
area = d3.area().x((_, index) => xScale(index
|
|
1934
|
+
area = d3.area().x((_, index) => xScale(index) + bandwidth / 2).y0((_, index) => {
|
|
2213
1935
|
if (index === 0) {
|
|
2214
1936
|
dataIndex = dataIndex + 1;
|
|
2215
1937
|
}
|
|
@@ -2232,25 +1954,7 @@ const drawLines = (_ref) => {
|
|
|
2232
1954
|
};
|
|
2233
1955
|
};
|
|
2234
1956
|
|
|
2235
|
-
|
|
2236
|
-
const data = _taggedTemplateLiteralLoose(["\n .", " {\n z-index: 1;\n transition: all linear 144ms;\n\n .", " {\n margin-bottom: 4px;\n :last-of-type {\n margin-bottom: 0;\n }\n }\n }\n"]);
|
|
2237
|
-
|
|
2238
|
-
_templateObject2$4 = function _templateObject2() {
|
|
2239
|
-
return data;
|
|
2240
|
-
};
|
|
2241
|
-
|
|
2242
|
-
return data;
|
|
2243
|
-
}
|
|
2244
|
-
|
|
2245
|
-
function _templateObject$a() {
|
|
2246
|
-
const data = _taggedTemplateLiteralLoose(["\n line {\n stroke-width: 1px;\n shape-rendering: crispEdges;\n }\n .", ",\n .", " {\n stroke: rgba(48, 69, 79, 0.06);\n }\n .", " {\n }\n .", " {\n fill: none;\n pointer-events: all;\n }\n .", " {\n stroke-width: 1.5px;\n stroke-linejoin: round;\n stroke-linecap: round;\n }\n .", " {\n shape-rendering: auto;\n }\n .", " {\n fill-opacity: 0.24;\n }\n"]);
|
|
2247
|
-
|
|
2248
|
-
_templateObject$a = function _templateObject() {
|
|
2249
|
-
return data;
|
|
2250
|
-
};
|
|
2251
|
-
|
|
2252
|
-
return data;
|
|
2253
|
-
}
|
|
1957
|
+
var _templateObject$a, _templateObject2$4;
|
|
2254
1958
|
const tooltipClassnames = {
|
|
2255
1959
|
barChartMouseRect: 'barChartMouseRect',
|
|
2256
1960
|
barChartMouseContainer: 'barChartMouseContainer',
|
|
@@ -2282,8 +1986,8 @@ const barChartClassNames = /*#__PURE__*/_extends({
|
|
|
2282
1986
|
barChartGridLineYZero: 'barChartGridLineYZero',
|
|
2283
1987
|
barChartGridLineY: 'barChartGridLineY'
|
|
2284
1988
|
}, tooltipClassnames, labelClassnames, barChartLinesClassNames);
|
|
2285
|
-
const SvgWrapper$4 = /*#__PURE__*/styled__default(Wrapper)( /*#__PURE__*/
|
|
2286
|
-
const TooltipStyles$1 = /*#__PURE__*/styled.createGlobalStyle( /*#__PURE__*/
|
|
1989
|
+
const SvgWrapper$4 = /*#__PURE__*/styled__default(Wrapper)(_templateObject$a || (_templateObject$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n line {\n stroke-width: 1px;\n shape-rendering: crispEdges;\n }\n .", ",\n .", " {\n stroke: rgba(48, 69, 79, 0.06);\n }\n .", " {\n }\n .", " {\n fill: none;\n pointer-events: all;\n }\n .", " {\n stroke-width: 1.5px;\n stroke-linejoin: round;\n stroke-linecap: round;\n }\n .", " {\n shape-rendering: auto;\n }\n .", " {\n fill-opacity: 0.24;\n }\n"])), barChartClassNames.barChartGridLineX, barChartClassNames.barChartGridLineY, barChartClassNames.barChartMouseRect, barChartClassNames.barChartMouseRect, barChartClassNames.barChartLinesGlobal, barChartClassNames.barChartLine, barChartClassNames.barChartArea);
|
|
1990
|
+
const TooltipStyles$1 = /*#__PURE__*/styled.createGlobalStyle(_templateObject2$4 || (_templateObject2$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .", " {\n z-index: 1;\n transition: all linear 144ms;\n\n .", " {\n margin-bottom: 4px;\n :last-of-type {\n margin-bottom: 0;\n }\n }\n }\n"])), barChartClassNames.barChartMouseTooltip, barChartClassNames.barChartTooltipItem);
|
|
2287
1991
|
|
|
2288
1992
|
const drawGrid$1 = (_ref) => {
|
|
2289
1993
|
let {
|
|
@@ -2313,6 +2017,7 @@ const drawGrid$1 = (_ref) => {
|
|
|
2313
2017
|
}
|
|
2314
2018
|
};
|
|
2315
2019
|
|
|
2020
|
+
const _excluded$2 = ["groupName"];
|
|
2316
2021
|
const getDomain = (_ref) => {
|
|
2317
2022
|
let {
|
|
2318
2023
|
data,
|
|
@@ -2322,7 +2027,7 @@ const getDomain = (_ref) => {
|
|
|
2322
2027
|
let MIN = Number.POSITIVE_INFINITY;
|
|
2323
2028
|
let MAX = Number.NEGATIVE_INFINITY;
|
|
2324
2029
|
data.forEach((_ref2) => {
|
|
2325
|
-
let groups = _objectWithoutPropertiesLoose(_ref2,
|
|
2030
|
+
let groups = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
|
|
2326
2031
|
|
|
2327
2032
|
let groupMax = 0;
|
|
2328
2033
|
let groupMin = 0;
|
|
@@ -2359,6 +2064,7 @@ const getDomain = (_ref) => {
|
|
|
2359
2064
|
};
|
|
2360
2065
|
};
|
|
2361
2066
|
|
|
2067
|
+
const _excluded$3 = ["groupName"];
|
|
2362
2068
|
const marshaling = (_ref) => {
|
|
2363
2069
|
let {
|
|
2364
2070
|
data,
|
|
@@ -2373,7 +2079,7 @@ const marshaling = (_ref) => {
|
|
|
2373
2079
|
let {
|
|
2374
2080
|
groupName
|
|
2375
2081
|
} = _ref2,
|
|
2376
|
-
groups = _objectWithoutPropertiesLoose(_ref2,
|
|
2082
|
+
groups = _objectWithoutPropertiesLoose(_ref2, _excluded$3);
|
|
2377
2083
|
|
|
2378
2084
|
const marshalledGroup = [];
|
|
2379
2085
|
const hundred = 100;
|
|
@@ -2444,6 +2150,7 @@ const getLabel = labelPosition => {
|
|
|
2444
2150
|
}
|
|
2445
2151
|
};
|
|
2446
2152
|
|
|
2153
|
+
const _excluded$4 = ["values"];
|
|
2447
2154
|
const drawTooltip$2 = (_ref) => {
|
|
2448
2155
|
let {
|
|
2449
2156
|
svg,
|
|
@@ -2566,7 +2273,7 @@ const drawTooltip$2 = (_ref) => {
|
|
|
2566
2273
|
}
|
|
2567
2274
|
|
|
2568
2275
|
const top = (typeof tooltipY === 'number' ? tooltipY : topYDomain[currIndex] - y2) + offsetY;
|
|
2569
|
-
const left = (tooltipBind ? (xScale(currIndex
|
|
2276
|
+
const left = (tooltipBind ? (xScale(currIndex) || 0) + bandwidth / 2 : x) + offsetX;
|
|
2570
2277
|
|
|
2571
2278
|
if (tooltipBind && flagCurrIndex === currIndex) {
|
|
2572
2279
|
return;
|
|
@@ -2583,7 +2290,7 @@ const drawTooltip$2 = (_ref) => {
|
|
|
2583
2290
|
let {
|
|
2584
2291
|
values
|
|
2585
2292
|
} = _ref4,
|
|
2586
|
-
rest = _objectWithoutPropertiesLoose(_ref4,
|
|
2293
|
+
rest = _objectWithoutPropertiesLoose(_ref4, _excluded$4);
|
|
2587
2294
|
|
|
2588
2295
|
return _extends({}, rest, {
|
|
2589
2296
|
value: values[currIndex],
|
|
@@ -2717,7 +2424,7 @@ const drawTooltip$2 = (_ref) => {
|
|
|
2717
2424
|
groupIndex: index
|
|
2718
2425
|
};
|
|
2719
2426
|
}))) : marshalledData;
|
|
2720
|
-
const groups = labelContainer.selectAll('div').data(concatedData).enter().append('div').style('position', 'absolute').style('transform', (_, index) => "translate(" + Math.round(xScale(index
|
|
2427
|
+
const groups = labelContainer.selectAll('div').data(concatedData).enter().append('div').style('position', 'absolute').style('transform', (_, index) => "translate(" + Math.round(xScale(index)) + "px," + -(marginTop || 0) + "px)");
|
|
2721
2428
|
const LabelFlexStyled = labelPosition === 'center' ? LabelFlexCenter : LabelFlex;
|
|
2722
2429
|
const LabelStyle = getLabel(labelPosition);
|
|
2723
2430
|
groups.selectAll('span').data(item => onLabelItem ? onLabelItem(item) : item).join('div').style('left', item => Math.round(item.x + barWidth / 2) + "px").style('top', item => getLabelY(labelPosition, y2, item) + "px").style('position', 'absolute').html(item => ReactDOMServer.renderToString(React__default.createElement(LabelFlexStyled, {
|
|
@@ -2730,6 +2437,7 @@ const drawTooltip$2 = (_ref) => {
|
|
|
2730
2437
|
}
|
|
2731
2438
|
};
|
|
2732
2439
|
|
|
2440
|
+
const _excluded$5 = ["groupName"];
|
|
2733
2441
|
const resizeBarWidth = (_ref) => {
|
|
2734
2442
|
let {
|
|
2735
2443
|
data,
|
|
@@ -2741,7 +2449,7 @@ const resizeBarWidth = (_ref) => {
|
|
|
2741
2449
|
const groupPadding = typeof sectionPadding === 'number' ? sectionPadding : 0;
|
|
2742
2450
|
const chartWidth = range[1] - range[0];
|
|
2743
2451
|
const barsWidth = data.reduce((acc, _ref2) => {
|
|
2744
|
-
let curr = _objectWithoutPropertiesLoose(_ref2,
|
|
2452
|
+
let curr = _objectWithoutPropertiesLoose(_ref2, _excluded$5);
|
|
2745
2453
|
|
|
2746
2454
|
return acc + Object.keys(curr).reduce((acc, _key, index) => index > 0 ? acc + (barWidth || 0) + (barPadding || 0) : acc + barWidth, 0) + groupPadding;
|
|
2747
2455
|
}, groupPadding);
|
|
@@ -2904,7 +2612,7 @@ const draw$4 = (node, props) => {
|
|
|
2904
2612
|
});
|
|
2905
2613
|
xAxis.attr('transform', "translate(0, " + (yScale(yTicks[0]) + (xAxisPadding || 0)) + ")");
|
|
2906
2614
|
const gSvg = svg.append('g').attr('class', barChartClassNames.barChartBarGlobal);
|
|
2907
|
-
const groups = gSvg.selectAll('g').data(marshalledData).enter().append('g').attr('transform', (_, i) => "translate(" + Math.round(xScale(i
|
|
2615
|
+
const groups = gSvg.selectAll('g').data(marshalledData).enter().append('g').attr('transform', (_, i) => "translate(" + Math.round(xScale(i)) + "," + -(marginTop || 0) + ")");
|
|
2908
2616
|
const bars = drawBars ? drawBars({
|
|
2909
2617
|
groups,
|
|
2910
2618
|
yScale,
|
|
@@ -3015,6 +2723,7 @@ BarChart.defaultProps = {
|
|
|
3015
2723
|
sectionPadding: 1
|
|
3016
2724
|
};
|
|
3017
2725
|
|
|
2726
|
+
const _excluded$6 = ["value"];
|
|
3018
2727
|
const hundred = 100;
|
|
3019
2728
|
const useMarshaling = (_ref) => {
|
|
3020
2729
|
let {
|
|
@@ -3047,7 +2756,7 @@ const useMarshaling = (_ref) => {
|
|
|
3047
2756
|
let {
|
|
3048
2757
|
value
|
|
3049
2758
|
} = _ref4,
|
|
3050
|
-
rest = _objectWithoutPropertiesLoose(_ref4,
|
|
2759
|
+
rest = _objectWithoutPropertiesLoose(_ref4, _excluded$6);
|
|
3051
2760
|
|
|
3052
2761
|
return _extends({}, rest, {
|
|
3053
2762
|
value,
|
|
@@ -3060,85 +2769,7 @@ const useMarshaling = (_ref) => {
|
|
|
3060
2769
|
}, [data, fullExtent, maxValue, labels]);
|
|
3061
2770
|
};
|
|
3062
2771
|
|
|
3063
|
-
|
|
3064
|
-
const data = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n display: flex;\n justify-content: flex-start;\n height: 100%;\n"]);
|
|
3065
|
-
|
|
3066
|
-
_templateObject8$1 = function _templateObject8() {
|
|
3067
|
-
return data;
|
|
3068
|
-
};
|
|
3069
|
-
|
|
3070
|
-
return data;
|
|
3071
|
-
}
|
|
3072
|
-
|
|
3073
|
-
function _templateObject7$1() {
|
|
3074
|
-
const data = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(0, -50%);\n"]);
|
|
3075
|
-
|
|
3076
|
-
_templateObject7$1 = function _templateObject7() {
|
|
3077
|
-
return data;
|
|
3078
|
-
};
|
|
3079
|
-
|
|
3080
|
-
return data;
|
|
3081
|
-
}
|
|
3082
|
-
|
|
3083
|
-
function _templateObject6$2() {
|
|
3084
|
-
const data = _taggedTemplateLiteralLoose(["\n position: relative;\n"]);
|
|
3085
|
-
|
|
3086
|
-
_templateObject6$2 = function _templateObject6() {
|
|
3087
|
-
return data;
|
|
3088
|
-
};
|
|
3089
|
-
|
|
3090
|
-
return data;
|
|
3091
|
-
}
|
|
3092
|
-
|
|
3093
|
-
function _templateObject5$2() {
|
|
3094
|
-
const data = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n will-change: left, top;\n"]);
|
|
3095
|
-
|
|
3096
|
-
_templateObject5$2 = function _templateObject5() {
|
|
3097
|
-
return data;
|
|
3098
|
-
};
|
|
3099
|
-
|
|
3100
|
-
return data;
|
|
3101
|
-
}
|
|
3102
|
-
|
|
3103
|
-
function _templateObject4$2() {
|
|
3104
|
-
const data = _taggedTemplateLiteralLoose(["\n width: 100%;\n position: relative;\n vertical-align: middle;\n"]);
|
|
3105
|
-
|
|
3106
|
-
_templateObject4$2 = function _templateObject4() {
|
|
3107
|
-
return data;
|
|
3108
|
-
};
|
|
3109
|
-
|
|
3110
|
-
return data;
|
|
3111
|
-
}
|
|
3112
|
-
|
|
3113
|
-
function _templateObject3$2() {
|
|
3114
|
-
const data = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n height: 1rem;\n"]);
|
|
3115
|
-
|
|
3116
|
-
_templateObject3$2 = function _templateObject3() {
|
|
3117
|
-
return data;
|
|
3118
|
-
};
|
|
3119
|
-
|
|
3120
|
-
return data;
|
|
3121
|
-
}
|
|
3122
|
-
|
|
3123
|
-
function _templateObject2$5() {
|
|
3124
|
-
const data = _taggedTemplateLiteralLoose(["\n text-align: right;\n"]);
|
|
3125
|
-
|
|
3126
|
-
_templateObject2$5 = function _templateObject2() {
|
|
3127
|
-
return data;
|
|
3128
|
-
};
|
|
3129
|
-
|
|
3130
|
-
return data;
|
|
3131
|
-
}
|
|
3132
|
-
|
|
3133
|
-
function _templateObject$b() {
|
|
3134
|
-
const data = _taggedTemplateLiteralLoose(["\n width: 100%;\n"]);
|
|
3135
|
-
|
|
3136
|
-
_templateObject$b = function _templateObject() {
|
|
3137
|
-
return data;
|
|
3138
|
-
};
|
|
3139
|
-
|
|
3140
|
-
return data;
|
|
3141
|
-
}
|
|
2772
|
+
var _templateObject$b, _templateObject2$5, _templateObject3$2, _templateObject4$2, _templateObject5$2, _templateObject6$2, _templateObject7$1, _templateObject8$1;
|
|
3142
2773
|
const horizontalBarChartClassNames = {
|
|
3143
2774
|
horizontalBarChartButtonTd: 'horizontalBarChartButtonTd',
|
|
3144
2775
|
horizontalBarChartLabelTd: 'horizontalBarChartLabelTd',
|
|
@@ -3161,14 +2792,14 @@ const horizontalBarChartClassNames = {
|
|
|
3161
2792
|
horizontalBarChartTooltipName: 'horizontalBarChartTooltipName',
|
|
3162
2793
|
horizontalBarChartTooltipValue: 'horizontalBarChartTooltipValue'
|
|
3163
2794
|
};
|
|
3164
|
-
const Table = /*#__PURE__*/styled__default.table( /*#__PURE__*/
|
|
3165
|
-
const LabelCell = /*#__PURE__*/styled__default.div( /*#__PURE__*/
|
|
3166
|
-
const BarFlex = /*#__PURE__*/styled__default.div( /*#__PURE__*/
|
|
3167
|
-
const BarsTd = /*#__PURE__*/styled__default.td( /*#__PURE__*/
|
|
3168
|
-
const TooltipFlex$1 = /*#__PURE__*/styled__default(TooltipFlex)( /*#__PURE__*/
|
|
3169
|
-
const StackSumContainer = /*#__PURE__*/styled__default.div( /*#__PURE__*/
|
|
3170
|
-
const StackSum = /*#__PURE__*/styled__default.div( /*#__PURE__*/
|
|
3171
|
-
const StackWrapper = /*#__PURE__*/styled__default.div( /*#__PURE__*/
|
|
2795
|
+
const Table = /*#__PURE__*/styled__default.table(_templateObject$b || (_templateObject$b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n"])));
|
|
2796
|
+
const LabelCell = /*#__PURE__*/styled__default.div(_templateObject2$5 || (_templateObject2$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n text-align: right;\n"])));
|
|
2797
|
+
const BarFlex = /*#__PURE__*/styled__default.div(_templateObject3$2 || (_templateObject3$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n height: 1rem;\n"])));
|
|
2798
|
+
const BarsTd = /*#__PURE__*/styled__default.td(_templateObject4$2 || (_templateObject4$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n position: relative;\n vertical-align: middle;\n"])));
|
|
2799
|
+
const TooltipFlex$1 = /*#__PURE__*/styled__default(TooltipFlex)(_templateObject5$2 || (_templateObject5$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n will-change: left, top;\n"])));
|
|
2800
|
+
const StackSumContainer = /*#__PURE__*/styled__default.div(_templateObject6$2 || (_templateObject6$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
2801
|
+
const StackSum = /*#__PURE__*/styled__default.div(_templateObject7$1 || (_templateObject7$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n white-space: nowrap;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(0, -50%);\n"])));
|
|
2802
|
+
const StackWrapper = /*#__PURE__*/styled__default.div(_templateObject8$1 || (_templateObject8$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n display: flex;\n justify-content: flex-start;\n height: 100%;\n"])));
|
|
3172
2803
|
|
|
3173
2804
|
const Tooltip = (_ref) => {
|
|
3174
2805
|
let {
|
|
@@ -3258,6 +2889,7 @@ const useTooltip = (_ref) => {
|
|
|
3258
2889
|
return [onMouseMove, onMouseLeave];
|
|
3259
2890
|
};
|
|
3260
2891
|
|
|
2892
|
+
const _excluded$7 = ["item", "mouseMove", "mouseLeave", "tooltipBind"];
|
|
3261
2893
|
const useStackWrapper = stackedTooltip => {
|
|
3262
2894
|
return React.useMemo(() => stackedTooltip ? (_ref) => {
|
|
3263
2895
|
let {
|
|
@@ -3266,7 +2898,7 @@ const useStackWrapper = stackedTooltip => {
|
|
|
3266
2898
|
mouseLeave,
|
|
3267
2899
|
tooltipBind
|
|
3268
2900
|
} = _ref,
|
|
3269
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
2901
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
3270
2902
|
|
|
3271
2903
|
return React__default.createElement(StackWrapper, Object.assign({
|
|
3272
2904
|
className: horizontalBarChartClassNames.horizontalBarChartStackWrapper,
|
|
@@ -3282,16 +2914,8 @@ const useStackWrapper = stackedTooltip => {
|
|
|
3282
2914
|
}, [stackedTooltip]);
|
|
3283
2915
|
};
|
|
3284
2916
|
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
_templateObject$c = function _templateObject() {
|
|
3289
|
-
return data;
|
|
3290
|
-
};
|
|
3291
|
-
|
|
3292
|
-
return data;
|
|
3293
|
-
}
|
|
3294
|
-
const BarStyled = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject$c());
|
|
2917
|
+
var _templateObject$c;
|
|
2918
|
+
const BarStyled = /*#__PURE__*/styled__default.div(_templateObject$c || (_templateObject$c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n display: inline-flex;\n height: 100%;\n"])));
|
|
3295
2919
|
|
|
3296
2920
|
const Bar = (_ref) => {
|
|
3297
2921
|
let {
|
|
@@ -3344,38 +2968,10 @@ const useScale = (_ref) => {
|
|
|
3344
2968
|
}, [maxValue, scaleTicks, scaleDomain]);
|
|
3345
2969
|
};
|
|
3346
2970
|
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
return data;
|
|
3352
|
-
};
|
|
3353
|
-
|
|
3354
|
-
return data;
|
|
3355
|
-
}
|
|
3356
|
-
|
|
3357
|
-
function _templateObject2$6() {
|
|
3358
|
-
const data = _taggedTemplateLiteralLoose(["\n position: relative;\n height: 1rem;\n"]);
|
|
3359
|
-
|
|
3360
|
-
_templateObject2$6 = function _templateObject2() {
|
|
3361
|
-
return data;
|
|
3362
|
-
};
|
|
3363
|
-
|
|
3364
|
-
return data;
|
|
3365
|
-
}
|
|
3366
|
-
|
|
3367
|
-
function _templateObject$d() {
|
|
3368
|
-
const data = _taggedTemplateLiteralLoose(["\n position: relative;\n"]);
|
|
3369
|
-
|
|
3370
|
-
_templateObject$d = function _templateObject() {
|
|
3371
|
-
return data;
|
|
3372
|
-
};
|
|
3373
|
-
|
|
3374
|
-
return data;
|
|
3375
|
-
}
|
|
3376
|
-
const TickTd = /*#__PURE__*/styled__default.td( /*#__PURE__*/_templateObject$d());
|
|
3377
|
-
const Ticks = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject2$6());
|
|
3378
|
-
const Tick = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject3$3());
|
|
2971
|
+
var _templateObject$d, _templateObject2$6, _templateObject3$3;
|
|
2972
|
+
const TickTd = /*#__PURE__*/styled__default.td(_templateObject$d || (_templateObject$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
2973
|
+
const Ticks = /*#__PURE__*/styled__default.div(_templateObject2$6 || (_templateObject2$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n height: 1rem;\n"])));
|
|
2974
|
+
const Tick = /*#__PURE__*/styled__default.div(_templateObject3$3 || (_templateObject3$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n white-space: nowrap;\n width: 0;\n height: 0;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
3379
2975
|
|
|
3380
2976
|
const XScale = (_ref) => {
|
|
3381
2977
|
let {
|
|
@@ -3532,25 +3128,7 @@ HorizontalBarChart.defaultProps = {
|
|
|
3532
3128
|
withoutXScale: false
|
|
3533
3129
|
};
|
|
3534
3130
|
|
|
3535
|
-
|
|
3536
|
-
const data = _taggedTemplateLiteralLoose(["\n .", " {\n position: absolute;\n transition: opacity 150ms cubic-bezier(0.2, 1, 0.6, 1);\n pointer-events: none;\n z-index: 1;\n }\n"]);
|
|
3537
|
-
|
|
3538
|
-
_templateObject2$7 = function _templateObject2() {
|
|
3539
|
-
return data;
|
|
3540
|
-
};
|
|
3541
|
-
|
|
3542
|
-
return data;
|
|
3543
|
-
}
|
|
3544
|
-
|
|
3545
|
-
function _templateObject$e() {
|
|
3546
|
-
const data = _taggedTemplateLiteralLoose(["\n .", ",\n .", ",\n .", " {\n shape-rendering: crispEdges;\n }\n\n .", ",\n .", " {\n stroke: rgba(149, 149, 149, 0.24);\n }\n\n .", " {\n font-size: 10px;\n }\n"]);
|
|
3547
|
-
|
|
3548
|
-
_templateObject$e = function _templateObject() {
|
|
3549
|
-
return data;
|
|
3550
|
-
};
|
|
3551
|
-
|
|
3552
|
-
return data;
|
|
3553
|
-
}
|
|
3131
|
+
var _templateObject$e, _templateObject2$7;
|
|
3554
3132
|
const bubbleChartClassNames = {
|
|
3555
3133
|
bubbleChartYAxis: 'bubbleChartYAxis',
|
|
3556
3134
|
bubbleChartYAxisZeroTick: 'bubbleChartYAxisZeroTick',
|
|
@@ -3565,8 +3143,8 @@ const bubbleChartClassNames = {
|
|
|
3565
3143
|
bubbleChartTooltipFlex: 'bubbleChartTooltipFlex',
|
|
3566
3144
|
bubbleChartTip: 'bubbleChartTip'
|
|
3567
3145
|
};
|
|
3568
|
-
const SvgWrapper$5 = /*#__PURE__*/styled__default(Wrapper)( /*#__PURE__*/
|
|
3569
|
-
const TooltipStyles$2 = /*#__PURE__*/styled.createGlobalStyle( /*#__PURE__*/
|
|
3146
|
+
const SvgWrapper$5 = /*#__PURE__*/styled__default(Wrapper)(_templateObject$e || (_templateObject$e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .", ",\n .", ",\n .", " {\n shape-rendering: crispEdges;\n }\n\n .", ",\n .", " {\n stroke: rgba(149, 149, 149, 0.24);\n }\n\n .", " {\n font-size: 10px;\n }\n"])), bubbleChartClassNames.bubbleChartYAxis, bubbleChartClassNames.bubbleChartXAxis, bubbleChartClassNames.bubbleChartGridGlobal, bubbleChartClassNames.bubbleChartGridLineX, bubbleChartClassNames.bubbleChartGridLineY, bubbleChartClassNames.bubbleChartYScaleLabel);
|
|
3147
|
+
const TooltipStyles$2 = /*#__PURE__*/styled.createGlobalStyle(_templateObject2$7 || (_templateObject2$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .", " {\n position: absolute;\n transition: opacity 150ms cubic-bezier(0.2, 1, 0.6, 1);\n pointer-events: none;\n z-index: 1;\n }\n"])), bubbleChartClassNames.bubbleChartTooltipContainer);
|
|
3570
3148
|
|
|
3571
3149
|
const drawGrid$2 = (_ref) => {
|
|
3572
3150
|
let {
|
|
@@ -3591,16 +3169,8 @@ const drawGrid$2 = (_ref) => {
|
|
|
3591
3169
|
}
|
|
3592
3170
|
};
|
|
3593
3171
|
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
_templateObject$f = function _templateObject() {
|
|
3598
|
-
return data;
|
|
3599
|
-
};
|
|
3600
|
-
|
|
3601
|
-
return data;
|
|
3602
|
-
}
|
|
3603
|
-
const Tooltip$1 = /*#__PURE__*/styled__default.div( /*#__PURE__*/_templateObject$f());
|
|
3172
|
+
var _templateObject$f;
|
|
3173
|
+
const Tooltip$1 = /*#__PURE__*/styled__default.div(_templateObject$f || (_templateObject$f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 0;\n height: 0;\n display: flex;\n align-items: flex-end;\n justify-content: center;\n font-size: 12px;\n white-space: nowrap;\n"])));
|
|
3604
3174
|
|
|
3605
3175
|
const drawTooltip$3 = (_ref) => {
|
|
3606
3176
|
let {
|