@evergis/charts 3.1.12 → 3.1.14

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/index.js CHANGED
@@ -27,10 +27,10 @@ function _interopNamespaceDefault(e) {
27
27
 
28
28
  var d3__namespace = /*#__PURE__*/_interopNamespaceDefault(d3);
29
29
 
30
- const Wrapper = styled.div `
31
- position: relative;
32
- width: 100%;
33
- box-sizing: border-box;
30
+ const Wrapper = styled.div `
31
+ position: relative;
32
+ width: 100%;
33
+ box-sizing: border-box;
34
34
  `;
35
35
 
36
36
  function useNode() {
@@ -78,10 +78,10 @@ const appendSvg = (node, width, height) => {
78
78
  return svg;
79
79
  };
80
80
 
81
- const SwipeScrollContainer = styled.div `
82
- width: 100%;
83
- overflow: hidden;
84
- user-select: none;
81
+ const SwipeScrollContainer = styled.div `
82
+ width: 100%;
83
+ overflow: hidden;
84
+ user-select: none;
85
85
  `;
86
86
 
87
87
  function animate({ duration, timing, draw, }) {
@@ -233,37 +233,37 @@ const getTranslate$1 = ({ anchor, index, translateX, translateY, }) => {
233
233
  }
234
234
  return `translate(${translateX}px, ${translateY}px)`;
235
235
  };
236
- const Label$2 = styled.div `
237
- display: flex;
238
- align-items: center;
239
- font-size: 12px;
236
+ const Label$2 = styled.div `
237
+ display: flex;
238
+ align-items: center;
239
+ font-size: 12px;
240
240
  `;
241
- const Name$1 = styled.div `
242
- text-align: center;
243
- max-width: 120px;
241
+ const Name$1 = styled.div `
242
+ text-align: center;
243
+ max-width: 120px;
244
244
  `;
245
- const middleBadgeStyles = styled.css `
246
- position: absolute;
247
- top: 50%;
248
- right: 0;
249
- transform: translate(calc(100% + 6px), -50%);
245
+ const middleBadgeStyles = styled.css `
246
+ position: absolute;
247
+ top: 50%;
248
+ right: 0;
249
+ transform: translate(calc(100% + 6px), -50%);
250
250
  `;
251
- const DefaultBadge = styled.div `
252
- display: flex;
253
- align-items: center;
254
- padding: 2px 4px;
255
- border-radius: 4px;
256
- color: rgb(255, 255, 255);
257
- background-color: rgb(144, 197, 61);
258
- margin-left: 8px;
251
+ const DefaultBadge = styled.div `
252
+ display: flex;
253
+ align-items: center;
254
+ padding: 2px 4px;
255
+ border-radius: 4px;
256
+ color: rgb(255, 255, 255);
257
+ background-color: rgb(144, 197, 61);
258
+ margin-left: 8px;
259
259
  `;
260
- const MiddleBadge = styled(DefaultBadge) `
261
- ${middleBadgeStyles}
260
+ const MiddleBadge = styled(DefaultBadge) `
261
+ ${middleBadgeStyles}
262
262
  `;
263
- const BadgePrefix = styled.div `
264
- margin-left: 4px;
265
- font-size: 10px;
266
- color: rgba(255, 255, 255, 0.54);
263
+ const BadgePrefix = styled.div `
264
+ margin-left: 4px;
265
+ font-size: 10px;
266
+ color: rgba(255, 255, 255, 0.54);
267
267
  `;
268
268
 
269
269
  const radarChartclassNames = {
@@ -278,29 +278,29 @@ const radarChartclassNames = {
278
278
  radarLabelBadgePrefix: 'radarLabelBadgePrefix',
279
279
  radarCircle: 'radarCircle',
280
280
  };
281
- const SvgWrapper$5 = styled(Wrapper) `
282
- .${radarChartclassNames.radarAxis} {
283
- path,
284
- line,
285
- circle {
286
- fill: none;
287
- stroke-width: 1px;
288
- stroke: rgba(149, 149, 149, 0.18);
289
- }
290
- }
291
- .${radarChartclassNames.radarAxisText} {
292
- font-size: 12px;
293
- fill-opacity: 0.56;
294
- }
295
- .${radarChartclassNames.radarPolygon} {
296
- fill-opacity: 0.06;
297
- stroke-width: 2px;
298
- fill: rgb(144, 197, 61);
299
- stroke: rgb(144, 197, 61);
300
- }
301
- .${radarChartclassNames.radarCircle} {
302
- fill: rgb(144, 197, 61);
303
- }
281
+ const SvgWrapper$5 = styled(Wrapper) `
282
+ .${radarChartclassNames.radarAxis} {
283
+ path,
284
+ line,
285
+ circle {
286
+ fill: none;
287
+ stroke-width: 1px;
288
+ stroke: rgba(149, 149, 149, 0.18);
289
+ }
290
+ }
291
+ .${radarChartclassNames.radarAxisText} {
292
+ font-size: 12px;
293
+ fill-opacity: 0.56;
294
+ }
295
+ .${radarChartclassNames.radarPolygon} {
296
+ fill-opacity: 0.06;
297
+ stroke-width: 2px;
298
+ fill: rgb(144, 197, 61);
299
+ stroke: rgb(144, 197, 61);
300
+ }
301
+ .${radarChartclassNames.radarCircle} {
302
+ fill: rgb(144, 197, 61);
303
+ }
304
304
  `;
305
305
 
306
306
  const getTranslate = ({ anchor, index, translateX, translateY, }) => {
@@ -322,8 +322,8 @@ const LabelContainer$1 = styled.div.attrs(props => ({
322
322
  style: {
323
323
  transform: getTranslate(props),
324
324
  },
325
- })) `
326
- position: absolute;
325
+ })) `
326
+ position: absolute;
327
327
  `;
328
328
 
329
329
  const degByIndex = (index, count) => {
@@ -596,21 +596,21 @@ const pieChartclassNames = {
596
596
  pieTooltipColorBox: 'pieTooltipColorBox',
597
597
  pieFullChartTooltipCircle: 'pieFullChartTooltipCircle',
598
598
  };
599
- const SvgWrapper$4 = styled(Wrapper) `
600
- .${pieChartclassNames.pieSliceLabel} {
601
- fill: #4a4a4a;
602
- }
603
- .${pieChartclassNames.pieRadialLabel} {
604
- position: absolute;
605
- max-width: 128px;
606
- }
607
- .${pieChartclassNames.pieRadialLink} {
608
- stroke: #000;
609
- }
610
- .${pieChartclassNames.pieFullChartTooltipCircle} {
611
- fill: transparent;
612
- cursor: pointer;
613
- }
599
+ const SvgWrapper$4 = styled(Wrapper) `
600
+ .${pieChartclassNames.pieSliceLabel} {
601
+ fill: #4a4a4a;
602
+ }
603
+ .${pieChartclassNames.pieRadialLabel} {
604
+ position: absolute;
605
+ max-width: 128px;
606
+ }
607
+ .${pieChartclassNames.pieRadialLink} {
608
+ stroke: #000;
609
+ }
610
+ .${pieChartclassNames.pieFullChartTooltipCircle} {
611
+ fill: transparent;
612
+ cursor: pointer;
613
+ }
614
614
  `;
615
615
 
616
616
  const getMidFactor = (d) => d.startAngle + (d.endAngle - d.startAngle) / 2 < Math.PI ? 1 : -1;
@@ -701,90 +701,90 @@ const drawRadialLabels = ({ arc, enableRadialLabels, global, node, radius, dataR
701
701
  }
702
702
  };
703
703
 
704
- const TooltipFlex$1 = styled.div `
705
- width: 0;
706
- height: 0;
707
- display: flex;
708
- align-items: flex-end;
709
- justify-content: center;
710
- pointer-events: none;
711
- white-space: nowrap;
704
+ const TooltipFlex$1 = styled.div `
705
+ width: 0;
706
+ height: 0;
707
+ display: flex;
708
+ align-items: flex-end;
709
+ justify-content: center;
710
+ pointer-events: none;
711
+ white-space: nowrap;
712
712
  `;
713
713
  const LabelFlex = styled(TooltipFlex$1) ``;
714
- const LabelFlexCenter = styled(LabelFlex) `
715
- align-items: center;
714
+ const LabelFlexCenter = styled(LabelFlex) `
715
+ align-items: center;
716
716
  `;
717
- const TooltipContainer = styled.div `
718
- position: relative;
719
- font-size: 11px;
720
- color: #fff;
721
- margin-bottom: 8px;
722
- padding: 4px 6px;
723
- background-color: rgba(48, 69, 79, 1);
724
- border-radius: 4px;
725
- box-shadow: 0 0.1875rem 0.5rem rgba(48, 69, 79, 0.06);
726
-
727
- :before {
728
- content: '';
729
- position: absolute;
730
- bottom: 0;
731
- left: 50%;
732
- transform: translate(-50%, 100%);
733
- width: 0;
734
- height: 0;
735
- border-style: solid;
736
- border-width: 4px 3px 0 3px;
737
- border-color: rgba(48, 69, 79, 1) transparent transparent transparent;
738
- }
717
+ const TooltipContainer = styled.div `
718
+ position: relative;
719
+ font-size: 11px;
720
+ color: #fff;
721
+ margin-bottom: 8px;
722
+ padding: 4px 6px;
723
+ background-color: rgba(48, 69, 79, 1);
724
+ border-radius: 4px;
725
+ box-shadow: 0 0.1875rem 0.5rem rgba(48, 69, 79, 0.06);
726
+
727
+ :before {
728
+ content: '';
729
+ position: absolute;
730
+ bottom: 0;
731
+ left: 50%;
732
+ transform: translate(-50%, 100%);
733
+ width: 0;
734
+ height: 0;
735
+ border-style: solid;
736
+ border-width: 4px 3px 0 3px;
737
+ border-color: rgba(48, 69, 79, 1) transparent transparent transparent;
738
+ }
739
739
  `;
740
- const TooltipGroupName = styled.div `
741
- font-size: 14px;
742
- margin-bottom: 6px;
740
+ const TooltipGroupName = styled.div `
741
+ font-size: 14px;
742
+ margin-bottom: 6px;
743
743
  `;
744
- const TooltipItem = styled.div `
745
- display: flex;
746
- align-items: center;
747
- margin-bottom: 0.25rem;
748
-
749
- &:last-of-type {
750
- margin-bottom: 0;
751
- }
744
+ const TooltipItem = styled.div `
745
+ display: flex;
746
+ align-items: center;
747
+ margin-bottom: 0.25rem;
748
+
749
+ &:last-of-type {
750
+ margin-bottom: 0;
751
+ }
752
752
  `;
753
- const ColFlex = styled.div `
754
- display: flex;
755
- align-items: center;
756
- margin-right: 4px;
753
+ const ColFlex = styled.div `
754
+ display: flex;
755
+ align-items: center;
756
+ margin-right: 4px;
757
757
  `;
758
- const ColorBox = styled.div `
759
- margin-right: 4px;
760
- width: 10px;
761
- height: 10px;
762
- border-radius: 2px;
758
+ const ColorBox = styled.div `
759
+ margin-right: 4px;
760
+ width: 10px;
761
+ height: 10px;
762
+ border-radius: 2px;
763
763
  `;
764
- const ColorLine = styled(ColorBox) `
765
- height: 2px;
766
- border-radius: 0;
764
+ const ColorLine = styled(ColorBox) `
765
+ height: 2px;
766
+ border-radius: 0;
767
767
  `;
768
- const Name = styled.div `
769
- margin-right: 4px;
768
+ const Name = styled.div `
769
+ margin-right: 4px;
770
770
  `;
771
- const Value = styled.div `
772
- text-align: right;
773
- flex-shrink: 0;
774
- flex-grow: 1;
771
+ const Value = styled.div `
772
+ text-align: right;
773
+ flex-shrink: 0;
774
+ flex-grow: 1;
775
775
  `;
776
- const Label$1 = styled.div `
777
- position: relative;
778
- font-size: 11px;
779
- color: #fff;
780
- font-weight: bold;
781
- letter-spacing: 0.52px;
776
+ const Label$1 = styled.div `
777
+ position: relative;
778
+ font-size: 11px;
779
+ color: #fff;
780
+ font-weight: bold;
781
+ letter-spacing: 0.52px;
782
782
  `;
783
- const LabelTop = styled(Label$1) `
784
- top: 6px;
783
+ const LabelTop = styled(Label$1) `
784
+ top: 6px;
785
785
  `;
786
- const LabelBottom = styled(Label$1) `
787
- bottom: 6px;
786
+ const LabelBottom = styled(Label$1) `
787
+ bottom: 6px;
788
788
  `;
789
789
 
790
790
  const drawTooltip$3 = ({ fullChartTooltip, global, tooltipRoot, data, tooltipClassName, tooltipBind, renderTooltip, arc, allSlices, tooltipStyle, width, height, radius, }) => {
@@ -1173,53 +1173,53 @@ const calendarChartClassNames = {
1173
1173
  ...legendClassNames,
1174
1174
  };
1175
1175
  const headerHeight = "20px";
1176
- const SvgWrapper$3 = styled(Wrapper) `
1177
- .${calendarChartClassNames.calendarYear} {
1178
- display: flex;
1179
- margin-bottom: 16px;
1180
- }
1181
-
1182
- .${calendarChartClassNames.calendarYearTitle} {
1183
- display: inline-flex;
1184
- align-items: flex-end;
1185
- height: ${headerHeight};
1186
- margin-bottom: 4px;
1187
- font-weight: bold;
1188
- }
1189
-
1190
- .${calendarChartClassNames.calendarHeader} {
1191
- height: ${headerHeight};
1192
- margin-bottom: 4px;
1193
- position: relative;
1194
- display: flex;
1195
- }
1196
-
1197
- .${calendarChartClassNames.calendarMonth} {
1198
- font-size: 14px;
1199
- bottom: 0;
1200
- position: absolute;
1201
- }
1202
-
1203
- .${calendarChartClassNames.calendarAxis} {
1204
- display: flex;
1205
- flex-direction: column;
1206
- margin-right: 10px;
1207
- }
1208
-
1209
- .${calendarChartClassNames.calendarWeekDay} {
1210
- font-size: 12px;
1211
- display: inline-flex;
1212
- align-items: center;
1213
- justify-content: flex-end;
1214
- }
1215
-
1216
- .${calendarChartClassNames.calendarDays} {
1217
- position: relative;
1218
- }
1219
-
1220
- .${calendarChartClassNames.calendarDay} {
1221
- position: absolute;
1222
- }
1176
+ const SvgWrapper$3 = styled(Wrapper) `
1177
+ .${calendarChartClassNames.calendarYear} {
1178
+ display: flex;
1179
+ margin-bottom: 16px;
1180
+ }
1181
+
1182
+ .${calendarChartClassNames.calendarYearTitle} {
1183
+ display: inline-flex;
1184
+ align-items: flex-end;
1185
+ height: ${headerHeight};
1186
+ margin-bottom: 4px;
1187
+ font-weight: bold;
1188
+ }
1189
+
1190
+ .${calendarChartClassNames.calendarHeader} {
1191
+ height: ${headerHeight};
1192
+ margin-bottom: 4px;
1193
+ position: relative;
1194
+ display: flex;
1195
+ }
1196
+
1197
+ .${calendarChartClassNames.calendarMonth} {
1198
+ font-size: 14px;
1199
+ bottom: 0;
1200
+ position: absolute;
1201
+ }
1202
+
1203
+ .${calendarChartClassNames.calendarAxis} {
1204
+ display: flex;
1205
+ flex-direction: column;
1206
+ margin-right: 10px;
1207
+ }
1208
+
1209
+ .${calendarChartClassNames.calendarWeekDay} {
1210
+ font-size: 12px;
1211
+ display: inline-flex;
1212
+ align-items: center;
1213
+ justify-content: flex-end;
1214
+ }
1215
+
1216
+ .${calendarChartClassNames.calendarDays} {
1217
+ position: relative;
1218
+ }
1219
+
1220
+ .${calendarChartClassNames.calendarDay} {
1221
+ position: absolute;
1222
+ }
1223
1223
  `;
1224
1224
 
1225
1225
  const draw$3 = (node, props) => {
@@ -1446,67 +1446,67 @@ const lineChartClassNames = {
1446
1446
  lineChartMouseLabelContainer: "lineChartMouseLabelContainer",
1447
1447
  lineChartMouseLabel: "lineChartMouseLabel",
1448
1448
  };
1449
- const SvgWrapper$2 = styled(Wrapper) `
1450
- .${lineChartClassNames.lineChartYScaleGlobal},
1451
- .${lineChartClassNames.lineChartXScaleGlobal},
1452
- .${lineChartClassNames.lineChartGridGlobal} {
1453
- shape-rendering: crispEdges;
1454
- }
1455
-
1456
- .${lineChartClassNames.lineChartLinesGlobal} {
1457
- fill: none;
1458
- stroke: steelblue;
1459
- stroke-width: 1.5px;
1460
- stroke-linejoin: round;
1461
- stroke-linecap: round;
1462
- }
1463
-
1464
- .${lineChartClassNames.lineChartArea} {
1465
- fill-opacity: 0.24;
1466
- }
1467
-
1468
- .${lineChartClassNames.lineChartGridLineX},
1469
- .${lineChartClassNames.lineChartGridLineY},
1470
- .${lineChartClassNames.lineChartMouseLine} {
1471
- stroke: rgba(149, 149, 149, 0.24);
1472
- }
1473
-
1474
- .${lineChartClassNames.lineChartMouseLine},
1475
- .${lineChartClassNames.lineChartMouseCircle} {
1476
- transition: opacity linear 200ms;
1477
- pointer-events: none;
1478
- stroke-width: 1px;
1479
- }
1480
-
1481
- .${lineChartClassNames.lineChartDot} {
1482
- stroke: #fff;
1483
- stroke-width: 2px;
1484
- }
1485
-
1486
- .${lineChartClassNames.lineChartMouseLine} {
1487
- shape-rendering: crispEdges;
1488
- }
1489
-
1490
- .${lineChartClassNames.lineChartMouseRect} {
1491
- fill: none;
1492
- pointer-events: all;
1493
- }
1449
+ const SvgWrapper$2 = styled(Wrapper) `
1450
+ .${lineChartClassNames.lineChartYScaleGlobal},
1451
+ .${lineChartClassNames.lineChartXScaleGlobal},
1452
+ .${lineChartClassNames.lineChartGridGlobal} {
1453
+ shape-rendering: crispEdges;
1454
+ }
1455
+
1456
+ .${lineChartClassNames.lineChartLinesGlobal} {
1457
+ fill: none;
1458
+ stroke: steelblue;
1459
+ stroke-width: 1.5px;
1460
+ stroke-linejoin: round;
1461
+ stroke-linecap: round;
1462
+ }
1463
+
1464
+ .${lineChartClassNames.lineChartArea} {
1465
+ fill-opacity: 0.24;
1466
+ }
1467
+
1468
+ .${lineChartClassNames.lineChartGridLineX},
1469
+ .${lineChartClassNames.lineChartGridLineY},
1470
+ .${lineChartClassNames.lineChartMouseLine} {
1471
+ stroke: rgba(149, 149, 149, 0.24);
1472
+ }
1473
+
1474
+ .${lineChartClassNames.lineChartMouseLine},
1475
+ .${lineChartClassNames.lineChartMouseCircle} {
1476
+ transition: opacity linear 200ms;
1477
+ pointer-events: none;
1478
+ stroke-width: 1px;
1479
+ }
1480
+
1481
+ .${lineChartClassNames.lineChartDot} {
1482
+ stroke: #fff;
1483
+ stroke-width: 2px;
1484
+ }
1485
+
1486
+ .${lineChartClassNames.lineChartMouseLine} {
1487
+ shape-rendering: crispEdges;
1488
+ }
1489
+
1490
+ .${lineChartClassNames.lineChartMouseRect} {
1491
+ fill: none;
1492
+ pointer-events: all;
1493
+ }
1494
1494
  `;
1495
- const TooltipStyles$2 = styled.createGlobalStyle `
1496
- .${lineChartClassNames.lineChartMouseLabel} {
1497
- transition: opacity linear 200ms;
1498
- z-index: 100;
1499
-
1500
- .${lineChartClassNames.lineChartLabelFlex} {
1501
- justify-content: flex-start;
1502
- align-items: center;
1503
- pointer-events: none;
1504
- }
1505
-
1506
- .${lineChartClassNames.lineChartLabel} {
1507
- margin: 0 0 0 10px;
1508
- }
1509
- }
1495
+ const TooltipStyles$2 = styled.createGlobalStyle `
1496
+ .${lineChartClassNames.lineChartMouseLabel} {
1497
+ transition: opacity linear 200ms;
1498
+ z-index: 100;
1499
+
1500
+ .${lineChartClassNames.lineChartLabelFlex} {
1501
+ justify-content: flex-start;
1502
+ align-items: center;
1503
+ pointer-events: none;
1504
+ }
1505
+
1506
+ .${lineChartClassNames.lineChartLabel} {
1507
+ margin: 0 0 0 10px;
1508
+ }
1509
+ }
1510
1510
  `;
1511
1511
 
1512
1512
  const drawGrid$2 = ({ svg, yScale, xScale, yTicksCount, lastIndex, drawGridX, drawGridY, }) => {
@@ -1542,17 +1542,17 @@ const drawGrid$2 = ({ svg, yScale, xScale, yTicksCount, lastIndex, drawGridX, dr
1542
1542
  }
1543
1543
  };
1544
1544
 
1545
- const LabelContainer = styled.div `
1546
- width: 0;
1547
- height: 0;
1548
- display: flex;
1549
- align-items: flex-end;
1550
- justify-content: center;
1551
- font-size: 12px;
1552
- white-space: nowrap;
1545
+ const LabelContainer = styled.div `
1546
+ width: 0;
1547
+ height: 0;
1548
+ display: flex;
1549
+ align-items: flex-end;
1550
+ justify-content: center;
1551
+ font-size: 12px;
1552
+ white-space: nowrap;
1553
1553
  `;
1554
- const Label = styled.div `
1555
- margin-bottom: 4px;
1554
+ const Label = styled.div `
1555
+ margin-bottom: 4px;
1556
1556
  `;
1557
1557
 
1558
1558
  const labelClassName = "d3-chart-label";
@@ -2135,65 +2135,65 @@ const barChartClassNames = {
2135
2135
  ...labelClassnames,
2136
2136
  ...barChartLinesClassNames,
2137
2137
  };
2138
- const SvgWrapper$1 = styled(Wrapper) `
2139
- display: ${({ selectable }) => selectable && "inline-block"};
2140
- user-select: ${({ selectable }) => selectable && "none"};
2141
- width: ${({ selectable }) => selectable && "auto"};
2142
-
2143
- line {
2144
- stroke-width: 1px;
2145
- shape-rendering: crispEdges;
2146
- }
2147
-
2148
- .${barChartClassNames.barChartGridLineX},
2149
- .${barChartClassNames.barChartGridLineY} {
2150
- stroke: rgba(48, 69, 79, 0.06);
2151
- }
2152
-
2153
- .${barChartClassNames.barChartMouseRect} {
2154
- }
2155
-
2156
- .${barChartClassNames.barChartMouseRect} {
2157
- fill: none;
2158
- pointer-events: all;
2159
- }
2160
-
2161
- .${barChartClassNames.barChartLinesGlobal} {
2162
- stroke-width: 1.5px;
2163
- stroke-linejoin: round;
2164
- stroke-linecap: round;
2165
- }
2166
-
2167
- .${barChartClassNames.barChartLine} {
2168
- shape-rendering: auto;
2169
- }
2170
-
2171
- .${barChartClassNames.barChartArea} {
2172
- fill-opacity: 0.24;
2173
- }
2174
-
2175
- .${barChartClassNames.barChartSelection} {
2176
- position: absolute;
2177
- top: 0;
2178
- width: 0;
2179
- background: rgba(0, 170, 255, 0.06);
2180
- box-shadow: 1px 0 0 #00AAFF, -1px 0 0 #00AAFF;
2181
- pointer-events: none;
2182
- }
2138
+ const SvgWrapper$1 = styled(Wrapper) `
2139
+ display: ${({ selectable }) => selectable && "inline-block"};
2140
+ user-select: ${({ selectable }) => selectable && "none"};
2141
+ width: ${({ selectable }) => selectable && "auto"};
2142
+
2143
+ line {
2144
+ stroke-width: 1px;
2145
+ shape-rendering: crispEdges;
2146
+ }
2147
+
2148
+ .${barChartClassNames.barChartGridLineX},
2149
+ .${barChartClassNames.barChartGridLineY} {
2150
+ stroke: rgba(48, 69, 79, 0.06);
2151
+ }
2152
+
2153
+ .${barChartClassNames.barChartMouseRect} {
2154
+ }
2155
+
2156
+ .${barChartClassNames.barChartMouseRect} {
2157
+ fill: none;
2158
+ pointer-events: all;
2159
+ }
2160
+
2161
+ .${barChartClassNames.barChartLinesGlobal} {
2162
+ stroke-width: 1.5px;
2163
+ stroke-linejoin: round;
2164
+ stroke-linecap: round;
2165
+ }
2166
+
2167
+ .${barChartClassNames.barChartLine} {
2168
+ shape-rendering: auto;
2169
+ }
2170
+
2171
+ .${barChartClassNames.barChartArea} {
2172
+ fill-opacity: 0.24;
2173
+ }
2174
+
2175
+ .${barChartClassNames.barChartSelection} {
2176
+ position: absolute;
2177
+ top: 0;
2178
+ width: 0;
2179
+ background: rgba(0, 170, 255, 0.06);
2180
+ box-shadow: 1px 0 0 #00AAFF, -1px 0 0 #00AAFF;
2181
+ pointer-events: none;
2182
+ }
2183
2183
  `;
2184
- const TooltipStyles$1 = styled.createGlobalStyle `
2185
- .${barChartClassNames.barChartMouseTooltip} {
2186
- z-index: 100;
2187
- transition: all linear 144ms;
2188
-
2189
- .${barChartClassNames.barChartTooltipItem} {
2190
- margin-bottom: 4px;
2191
-
2192
- :last-of-type {
2193
- margin-bottom: 0;
2194
- }
2195
- }
2196
- }
2184
+ const TooltipStyles$1 = styled.createGlobalStyle `
2185
+ .${barChartClassNames.barChartMouseTooltip} {
2186
+ z-index: 100;
2187
+ transition: all linear 144ms;
2188
+
2189
+ .${barChartClassNames.barChartTooltipItem} {
2190
+ margin-bottom: 4px;
2191
+
2192
+ :last-of-type {
2193
+ margin-bottom: 0;
2194
+ }
2195
+ }
2196
+ }
2197
2197
  `;
2198
2198
 
2199
2199
  const useSelection = (node, props) => {
@@ -2739,10 +2739,10 @@ const MIN_BAR_HEIGHT = 2;
2739
2739
  const draw$1 = (node, props) => {
2740
2740
  const { data, lineData = [], markers = [], barWidth: barWidthProp, barPadding, colors, margin, xAxisPadding, yAxisPadding, drawGridY, drawGridX, customYScale, customXScale, customYAxisLeft, customXAxisBottom, customYAxis, customXAxis, customBars, customize, dynamicTooltipEnable, hideTooltipGroupName, renderTooltip, labelPosition, renderLabel, tooltipY, tooltipBind, stackedLine, curve, formatTooltipValue, formatTooltipName, sectionPadding, minValuesLine, tooltipYDomain, marshalledMap, minValue, maxValue, minDomainValue, maxDomainValue, drawBars, setTooltipPosition, onLabelItem, isBarTooltip, xScaleItemWidth, tooltipRoot, tooltipClassName, onBarClick, onBarHover, } = props;
2741
2741
  if (node !== null && data.length) {
2742
- const marginTop = margin ? margin.top : 0;
2743
- const marginRight = margin ? margin.right : 0;
2744
- const marginBottom = margin ? margin.bottom : 0;
2745
- const marginLeft = margin ? margin.left : 0;
2742
+ const marginTop = margin?.top ?? 0;
2743
+ const marginRight = margin?.right ?? 0;
2744
+ const marginBottom = margin?.bottom ?? 0;
2745
+ const marginLeft = margin?.left ?? 0;
2746
2746
  const defaultBarWidth = 12;
2747
2747
  const { width: nodeWidth } = node.getBoundingClientRect();
2748
2748
  const width = props.width || nodeWidth;
@@ -2851,7 +2851,7 @@ const draw$1 = (node, props) => {
2851
2851
  .attr('id', maskId)
2852
2852
  .append('rect')
2853
2853
  .attr('width', '100%')
2854
- .attr('height', height - marginBottom + MIN_BAR_HEIGHT)
2854
+ .attr('height', height - marginTop - marginBottom + MIN_BAR_HEIGHT)
2855
2855
  .attr('fill', 'white');
2856
2856
  const gSvg = svg.append('g')
2857
2857
  .attr('class', barChartClassNames.barChartBarGlobal)
@@ -3040,45 +3040,45 @@ const horizontalBarChartClassNames = {
3040
3040
  horizontalBarChartTooltipName: "horizontalBarChartTooltipName",
3041
3041
  horizontalBarChartTooltipValue: "horizontalBarChartTooltipValue",
3042
3042
  };
3043
- const Table = styled.table `
3044
- width: 100%;
3043
+ const Table = styled.table `
3044
+ width: 100%;
3045
3045
  `;
3046
- const LabelCell = styled.div `
3047
- text-align: right;
3046
+ const LabelCell = styled.div `
3047
+ text-align: right;
3048
3048
  `;
3049
- const BarFlex = styled.div `
3050
- width: 100%;
3051
- display: flex;
3052
- height: 1rem;
3049
+ const BarFlex = styled.div `
3050
+ width: 100%;
3051
+ display: flex;
3052
+ height: 1rem;
3053
3053
  `;
3054
- const BarsTd = styled.td `
3055
- width: 100%;
3056
- position: relative;
3057
- vertical-align: middle;
3054
+ const BarsTd = styled.td `
3055
+ width: 100%;
3056
+ position: relative;
3057
+ vertical-align: middle;
3058
3058
  `;
3059
- const TooltipFlex = styled(TooltipFlex$1) `
3060
- position: absolute;
3061
- top: 0;
3062
- left: 50%;
3063
- transform: translate(-50%, -50%);
3064
- will-change: left, top;
3059
+ const TooltipFlex = styled(TooltipFlex$1) `
3060
+ position: absolute;
3061
+ top: 0;
3062
+ left: 50%;
3063
+ transform: translate(-50%, -50%);
3064
+ will-change: left, top;
3065
3065
  `;
3066
- const StackSumContainer = styled.div `
3067
- position: relative;
3066
+ const StackSumContainer = styled.div `
3067
+ position: relative;
3068
3068
  `;
3069
- const StackSum = styled.div `
3070
- white-space: nowrap;
3071
- position: absolute;
3072
- top: 50%;
3073
- left: 50%;
3074
- transform: translate(0, -50%);
3069
+ const StackSum = styled.div `
3070
+ white-space: nowrap;
3071
+ position: absolute;
3072
+ top: 50%;
3073
+ left: 50%;
3074
+ transform: translate(0, -50%);
3075
3075
  `;
3076
- const StackWrapper = styled.div `
3077
- position: absolute;
3078
- top: 0;
3079
- display: flex;
3080
- justify-content: flex-start;
3081
- height: 100%;
3076
+ const StackWrapper = styled.div `
3077
+ position: absolute;
3078
+ top: 0;
3079
+ display: flex;
3080
+ justify-content: flex-start;
3081
+ height: 100%;
3082
3082
  `;
3083
3083
 
3084
3084
  const Tooltip$1 = ({ renderTooltip, bars, style, className, }) => {
@@ -3130,10 +3130,10 @@ const useStackWrapper = (stackedTooltip) => {
3130
3130
  : ({ children }) => (jsxRuntime.jsx(react.Fragment, { children: children })), [stackedTooltip]);
3131
3131
  };
3132
3132
 
3133
- const BarStyled = styled.div `
3134
- position: relative;
3135
- display: inline-flex;
3136
- height: 100%;
3133
+ const BarStyled = styled.div `
3134
+ position: relative;
3135
+ display: inline-flex;
3136
+ height: 100%;
3137
3137
  `;
3138
3138
 
3139
3139
  const Bar = ({ withTooltip, bar, formatNativeTitle, tooltipBind, mouseMove, mouseLeave, pointerEventsNone, isFirstChild, isLastChild, isOnlyChild, }) => {
@@ -3150,23 +3150,23 @@ const Bar = ({ withTooltip, bar, formatNativeTitle, tooltipBind, mouseMove, mous
3150
3150
  }, title: formatNativeTitle ? formatNativeTitle(bar) : "", onMouseOver: onMouseMove, onMouseMove: tooltipBind ? onMouseMove : void 0, onMouseOut: onMouseLeave }));
3151
3151
  };
3152
3152
 
3153
- const TickTd = styled.td `
3154
- position: relative;
3153
+ const TickTd = styled.td `
3154
+ position: relative;
3155
3155
  `;
3156
- const Ticks = styled.div `
3157
- position: relative;
3158
- height: 1rem;
3156
+ const Ticks = styled.div `
3157
+ position: relative;
3158
+ height: 1rem;
3159
3159
  `;
3160
- const Tick = styled.div `
3161
- white-space: nowrap;
3162
- width: 0;
3163
- height: 0;
3164
- position: absolute;
3165
- top: 50%;
3166
- transform: translateY(-50%);
3167
- display: flex;
3168
- align-items: center;
3169
- justify-content: center;
3160
+ const Tick = styled.div `
3161
+ white-space: nowrap;
3162
+ width: 0;
3163
+ height: 0;
3164
+ position: absolute;
3165
+ top: 50%;
3166
+ transform: translateY(-50%);
3167
+ display: flex;
3168
+ align-items: center;
3169
+ justify-content: center;
3170
3170
  `;
3171
3171
 
3172
3172
  const hundred = 100;
@@ -3265,29 +3265,29 @@ const bubbleChartClassNames = {
3265
3265
  bubbleChartTooltipFlex: "bubbleChartTooltipFlex",
3266
3266
  bubbleChartTip: "bubbleChartTip",
3267
3267
  };
3268
- const SvgWrapper = styled(Wrapper) `
3269
- .${bubbleChartClassNames.bubbleChartYAxis},
3270
- .${bubbleChartClassNames.bubbleChartXAxis},
3271
- .${bubbleChartClassNames.bubbleChartGridGlobal} {
3272
- shape-rendering: crispEdges;
3273
- }
3274
-
3275
- .${bubbleChartClassNames.bubbleChartGridLineX},
3276
- .${bubbleChartClassNames.bubbleChartGridLineY} {
3277
- stroke: rgba(149, 149, 149, 0.24);
3278
- }
3279
-
3280
- .${bubbleChartClassNames.bubbleChartYScaleLabel} {
3281
- font-size: 10px;
3282
- }
3268
+ const SvgWrapper = styled(Wrapper) `
3269
+ .${bubbleChartClassNames.bubbleChartYAxis},
3270
+ .${bubbleChartClassNames.bubbleChartXAxis},
3271
+ .${bubbleChartClassNames.bubbleChartGridGlobal} {
3272
+ shape-rendering: crispEdges;
3273
+ }
3274
+
3275
+ .${bubbleChartClassNames.bubbleChartGridLineX},
3276
+ .${bubbleChartClassNames.bubbleChartGridLineY} {
3277
+ stroke: rgba(149, 149, 149, 0.24);
3278
+ }
3279
+
3280
+ .${bubbleChartClassNames.bubbleChartYScaleLabel} {
3281
+ font-size: 10px;
3282
+ }
3283
3283
  `;
3284
- const TooltipStyles = styled.createGlobalStyle `
3285
- .${bubbleChartClassNames.bubbleChartTooltipContainer} {
3286
- position: absolute;
3287
- transition: opacity 150ms cubic-bezier(0.2, 1, 0.6, 1);
3288
- pointer-events: none;
3289
- z-index: 1;
3290
- }
3284
+ const TooltipStyles = styled.createGlobalStyle `
3285
+ .${bubbleChartClassNames.bubbleChartTooltipContainer} {
3286
+ position: absolute;
3287
+ transition: opacity 150ms cubic-bezier(0.2, 1, 0.6, 1);
3288
+ pointer-events: none;
3289
+ z-index: 1;
3290
+ }
3291
3291
  `;
3292
3292
 
3293
3293
  const drawGrid = ({ svg, yScale, xScale, yTicksCount, drawGridX, drawGridY, }) => {
@@ -3324,14 +3324,14 @@ const drawGrid = ({ svg, yScale, xScale, yTicksCount, drawGridX, drawGridY, }) =
3324
3324
  }
3325
3325
  };
3326
3326
 
3327
- const Tooltip = styled.div `
3328
- width: 0;
3329
- height: 0;
3330
- display: flex;
3331
- align-items: flex-end;
3332
- justify-content: center;
3333
- font-size: 12px;
3334
- white-space: nowrap;
3327
+ const Tooltip = styled.div `
3328
+ width: 0;
3329
+ height: 0;
3330
+ display: flex;
3331
+ align-items: flex-end;
3332
+ justify-content: center;
3333
+ font-size: 12px;
3334
+ white-space: nowrap;
3335
3335
  `;
3336
3336
 
3337
3337
  const drawTooltip = ({ bubbles, tooltipRoot, tooltipClassName, renderTooltip, }) => {