@evergis/charts 2.0.43 → 2.0.44
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/LICENSE +20 -20
- package/README.md +13 -13
- package/dist/charts.cjs.development.js +100 -100
- package/dist/charts.cjs.development.js.map +1 -1
- package/dist/charts.cjs.production.min.js.map +1 -1
- package/dist/charts.esm.js +100 -100
- package/dist/charts.esm.js.map +1 -1
- package/dist/helpers/getLegend/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/charts.esm.js
CHANGED
|
@@ -234,7 +234,7 @@ const useSwipe = (node, _ref) => {
|
|
|
234
234
|
};
|
|
235
235
|
|
|
236
236
|
const _excluded = ["children", "width", "onSwipe"];
|
|
237
|
-
const SwipeScroll = _ref => {
|
|
237
|
+
const SwipeScroll = (_ref) => {
|
|
238
238
|
let {
|
|
239
239
|
children,
|
|
240
240
|
width,
|
|
@@ -278,7 +278,7 @@ const getTextAnchor = (index, length) => {
|
|
|
278
278
|
|
|
279
279
|
var _templateObject$2;
|
|
280
280
|
|
|
281
|
-
const getTranslate = _ref => {
|
|
281
|
+
const getTranslate = (_ref) => {
|
|
282
282
|
let {
|
|
283
283
|
anchor,
|
|
284
284
|
index,
|
|
@@ -306,7 +306,7 @@ const LabelContainer = /*#__PURE__*/styled.div.attrs(props => ({
|
|
|
306
306
|
}))(_templateObject$2 || (_templateObject$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n"])));
|
|
307
307
|
|
|
308
308
|
const labelClassName = 'd3-chart-label';
|
|
309
|
-
const drawRadialLabels = _ref => {
|
|
309
|
+
const drawRadialLabels = (_ref) => {
|
|
310
310
|
let {
|
|
311
311
|
node,
|
|
312
312
|
dataLength,
|
|
@@ -358,7 +358,7 @@ const drawRadialLabels = _ref => {
|
|
|
358
358
|
};
|
|
359
359
|
|
|
360
360
|
var _templateObject$3, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
361
|
-
const getTranslate$1 = _ref => {
|
|
361
|
+
const getTranslate$1 = (_ref) => {
|
|
362
362
|
let {
|
|
363
363
|
anchor,
|
|
364
364
|
index,
|
|
@@ -427,13 +427,13 @@ const draw = (node, props) => {
|
|
|
427
427
|
const width = props.width || nodeWidth;
|
|
428
428
|
const defaultHeight = 400;
|
|
429
429
|
const height = props.height || defaultHeight;
|
|
430
|
-
const minValue = props.minValue || Math.min(0, min(data, i => min(i.map(_ref => {
|
|
430
|
+
const minValue = props.minValue || Math.min(0, min(data, i => min(i.map((_ref) => {
|
|
431
431
|
let {
|
|
432
432
|
value
|
|
433
433
|
} = _ref;
|
|
434
434
|
return value;
|
|
435
435
|
}))));
|
|
436
|
-
const maxValue = (props.maxValue || Math.max(0, max(data, i => max(i.map(_ref2 => {
|
|
436
|
+
const maxValue = (props.maxValue || Math.max(0, max(data, i => max(i.map((_ref2) => {
|
|
437
437
|
let {
|
|
438
438
|
value
|
|
439
439
|
} = _ref2;
|
|
@@ -456,14 +456,14 @@ const draw = (node, props) => {
|
|
|
456
456
|
const angleSlice = Math.PI * 2 / data[0].length;
|
|
457
457
|
const radiusScale = scaleLinear().range([0, radius]).domain([0, newMaxValue]);
|
|
458
458
|
const radarLine = lineRadial().curve(curveLinearClosed) // @ts-ignore
|
|
459
|
-
.radius(_ref3 => {
|
|
459
|
+
.radius((_ref3) => {
|
|
460
460
|
let {
|
|
461
461
|
value
|
|
462
462
|
} = _ref3;
|
|
463
463
|
return radiusScale(value);
|
|
464
464
|
}).angle((_, i) => i * angleSlice);
|
|
465
465
|
const radarValue = lineRadial().curve(curve || curveLinearClosed) // @ts-ignore
|
|
466
|
-
.radius(_ref4 => {
|
|
466
|
+
.radius((_ref4) => {
|
|
467
467
|
let {
|
|
468
468
|
value
|
|
469
469
|
} = _ref4;
|
|
@@ -479,7 +479,7 @@ const draw = (node, props) => {
|
|
|
479
479
|
|
|
480
480
|
const gridGlobal = globalCenter.append('g').attr('class', radarChartclassNames.radarAxis).selectAll().data([data[0]]).enter();
|
|
481
481
|
const radarGlobal = globalCenter.append('g').attr('class', radarChartclassNames.radar);
|
|
482
|
-
const axis = gridGlobal.selectAll().data(data[0].map(_ref5 => {
|
|
482
|
+
const axis = gridGlobal.selectAll().data(data[0].map((_ref5) => {
|
|
483
483
|
let {
|
|
484
484
|
name
|
|
485
485
|
} = _ref5;
|
|
@@ -654,7 +654,7 @@ const getAlign = d => {
|
|
|
654
654
|
return midangle < Math.PI ? 'start' : 'end';
|
|
655
655
|
};
|
|
656
656
|
|
|
657
|
-
const drawRadialLabels$1 = _ref => {
|
|
657
|
+
const drawRadialLabels$1 = (_ref) => {
|
|
658
658
|
let {
|
|
659
659
|
arc: arc$1,
|
|
660
660
|
enableRadialLabels,
|
|
@@ -726,7 +726,7 @@ const Label$1 = /*#__PURE__*/styled.div(_templateObject12 || (_templateObject12
|
|
|
726
726
|
const LabelTop = /*#__PURE__*/styled(Label$1)(_templateObject13 || (_templateObject13 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n top: 6px;\n"])));
|
|
727
727
|
const LabelBottom = /*#__PURE__*/styled(Label$1)(_templateObject14 || (_templateObject14 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n bottom: 6px;\n"])));
|
|
728
728
|
|
|
729
|
-
const drawTooltip = _ref => {
|
|
729
|
+
const drawTooltip = (_ref) => {
|
|
730
730
|
let {
|
|
731
731
|
fullChartTooltip,
|
|
732
732
|
global,
|
|
@@ -749,7 +749,7 @@ const drawTooltip = _ref => {
|
|
|
749
749
|
const tooltipContainer = isEmpty ? select(container).append('div').attr('class', pieChartclassNames.pieTooltipContainer + " " + (tooltipClassName || '')).style('position', 'absolute').style('opacity', '0') : pieTooltipContainer;
|
|
750
750
|
|
|
751
751
|
if (tooltipStyle) {
|
|
752
|
-
Object.entries(tooltipStyle).forEach(_ref2 => {
|
|
752
|
+
Object.entries(tooltipStyle).forEach((_ref2) => {
|
|
753
753
|
let [prop, val] = _ref2;
|
|
754
754
|
return tooltipContainer.style(prop, val);
|
|
755
755
|
});
|
|
@@ -905,7 +905,7 @@ const draw$1 = (node, props) => {
|
|
|
905
905
|
const dividerPadAngle = 100;
|
|
906
906
|
const fullAngle = 360;
|
|
907
907
|
const pie$1 = pie().startAngle(-degreesToRadians(startAngle || 0)).endAngle(degreesToRadians(endAngle || fullAngle)).padAngle(padAngle ? Math.max(Math.min(padAngle / dividerPadAngle, maxPadAngle), 0) : 0).sort(null) // @ts-ignore
|
|
908
|
-
.value(_ref => {
|
|
908
|
+
.value((_ref) => {
|
|
909
909
|
let {
|
|
910
910
|
value
|
|
911
911
|
} = _ref;
|
|
@@ -927,7 +927,7 @@ const draw$1 = (node, props) => {
|
|
|
927
927
|
const format$1 = format(',');
|
|
928
928
|
const allSlices = global.selectAll('allSlices').data(dataReady).enter().append('path') // @ts-ignore
|
|
929
929
|
.attr('d', arc$1);
|
|
930
|
-
allSlices.attr('class', pieChartclassNames.pieSlice).attr('fill', _ref2 => {
|
|
930
|
+
allSlices.attr('class', pieChartclassNames.pieSlice).attr('fill', (_ref2) => {
|
|
931
931
|
let {
|
|
932
932
|
index
|
|
933
933
|
} = _ref2;
|
|
@@ -1060,7 +1060,7 @@ const legendDefaultParams = {
|
|
|
1060
1060
|
ticksDivier: 64,
|
|
1061
1061
|
titleMarginBottom: 6
|
|
1062
1062
|
};
|
|
1063
|
-
const getLegend = _ref => {
|
|
1063
|
+
const getLegend = (_ref) => {
|
|
1064
1064
|
let {
|
|
1065
1065
|
color,
|
|
1066
1066
|
title,
|
|
@@ -1095,25 +1095,25 @@ const getLegend = _ref => {
|
|
|
1095
1095
|
svg.append('image').attr('x', marginLeft).attr('y', marginTop).attr('class', legendClassNames.legendContainer).attr('width', width - marginLeft - marginRight).attr('height', height - marginTop - marginBottom).attr('preserveAspectRatio', 'none').attr('xlink:href', ramp(color.copy().domain(quantize(interpolate(0, 1), n))).toDataURL());
|
|
1096
1096
|
} // Sequential
|
|
1097
1097
|
else if (color.interpolator) {
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1098
|
+
x = Object.assign(color.copy().interpolator(interpolateRound(marginLeft, width - marginRight)), {
|
|
1099
|
+
range() {
|
|
1100
|
+
return [marginLeft, width - marginRight];
|
|
1101
|
+
}
|
|
1102
1102
|
|
|
1103
|
-
|
|
1104
|
-
|
|
1103
|
+
});
|
|
1104
|
+
svg.append('image').attr('x', marginLeft).attr('y', marginTop).attr('width', width - marginLeft - marginRight).attr('height', height - marginTop - marginBottom).attr('preserveAspectRatio', 'none').attr('xlink:href', ramp(color.interpolator()).toDataURL()); // scaleSequentialQuantile doesn’t implement ticks or tickFormat.
|
|
1105
1105
|
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1106
|
+
if (!x.ticks) {
|
|
1107
|
+
if (tickValues === undefined) {
|
|
1108
|
+
const n = Math.round(ticks + 1);
|
|
1109
|
+
tickValues = range$1(n).map(i => quantile(color.domain(), i / (n - 1)));
|
|
1110
|
+
}
|
|
1111
1111
|
|
|
1112
|
-
|
|
1113
|
-
|
|
1112
|
+
if (typeof tickFormat !== 'function') {
|
|
1113
|
+
tickFormat = format(tickFormat === undefined ? ',f' : tickFormat);
|
|
1114
|
+
}
|
|
1114
1115
|
}
|
|
1115
1116
|
}
|
|
1116
|
-
}
|
|
1117
1117
|
|
|
1118
1118
|
svg.append('g').attr('transform', "translate(0," + (height - marginBottom) + ")").call(axisBottom(x).ticks(ticks, typeof tickFormat === 'string' ? tickFormat : undefined) // @ts-ignore
|
|
1119
1119
|
.tickFormat(typeof tickFormat === 'function' ? tickFormat : undefined).tickSize(tickSize) // @ts-ignore
|
|
@@ -1171,13 +1171,13 @@ const draw$2 = (node, props) => {
|
|
|
1171
1171
|
const getMonthSpacing = date => date.getUTCMonth() * (monthSpacing || 0);
|
|
1172
1172
|
|
|
1173
1173
|
const formatMonth = utcFormat('%b');
|
|
1174
|
-
const max$1 = max(data.map(_ref => {
|
|
1174
|
+
const max$1 = max(data.map((_ref) => {
|
|
1175
1175
|
let {
|
|
1176
1176
|
value
|
|
1177
1177
|
} = _ref;
|
|
1178
1178
|
return value;
|
|
1179
1179
|
}));
|
|
1180
|
-
const min$1 = min(data.map(_ref2 => {
|
|
1180
|
+
const min$1 = min(data.map((_ref2) => {
|
|
1181
1181
|
let {
|
|
1182
1182
|
value
|
|
1183
1183
|
} = _ref2;
|
|
@@ -1200,7 +1200,7 @@ const draw$2 = (node, props) => {
|
|
|
1200
1200
|
.data(years).join('div').attr('class', calendarChartClassNames.calendarYear);
|
|
1201
1201
|
const calendarWeekdays = year.append('div').attr('class', calendarChartClassNames.calendarAxis);
|
|
1202
1202
|
calendarWeekdays.append('div').attr('class', calendarChartClassNames.calendarYearTitle) // @ts-ignore
|
|
1203
|
-
.text(_ref3 => {
|
|
1203
|
+
.text((_ref3) => {
|
|
1204
1204
|
let [key] = _ref3;
|
|
1205
1205
|
return key;
|
|
1206
1206
|
});
|
|
@@ -1208,7 +1208,7 @@ const draw$2 = (node, props) => {
|
|
|
1208
1208
|
const body = year.append('div').attr('class', calendarChartClassNames.calendarBody);
|
|
1209
1209
|
const header = body.append('div').attr('class', calendarChartClassNames.calendarHeader);
|
|
1210
1210
|
header.selectAll('div') // @ts-ignore
|
|
1211
|
-
.data(_ref4 => {
|
|
1211
|
+
.data((_ref4) => {
|
|
1212
1212
|
let [_, values] = _ref4;
|
|
1213
1213
|
const fullYearlastMonth = 12;
|
|
1214
1214
|
const fullYearlastDate = 31;
|
|
@@ -1217,7 +1217,7 @@ const draw$2 = (node, props) => {
|
|
|
1217
1217
|
.text(formatMonth); // @ts-ignore
|
|
1218
1218
|
|
|
1219
1219
|
body.append('div').attr('class', calendarChartClassNames.calendarDays).style('height', (cellSize + cellOffset) * weekDays + 'px').style('width', chartWidth + 'px').selectAll('div') // @ts-ignore
|
|
1220
|
-
.data(_ref5 => {
|
|
1220
|
+
.data((_ref5) => {
|
|
1221
1221
|
let [, values] = _ref5;
|
|
1222
1222
|
return values;
|
|
1223
1223
|
}).join('div') // @ts-ignore
|
|
@@ -1345,7 +1345,7 @@ const lineChartClassNames = {
|
|
|
1345
1345
|
const SvgWrapper$3 = /*#__PURE__*/styled(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);
|
|
1346
1346
|
const TooltipStyles = /*#__PURE__*/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);
|
|
1347
1347
|
|
|
1348
|
-
const drawGrid = _ref => {
|
|
1348
|
+
const drawGrid = (_ref) => {
|
|
1349
1349
|
let {
|
|
1350
1350
|
svg,
|
|
1351
1351
|
yScale,
|
|
@@ -1375,7 +1375,7 @@ const LabelContainer$1 = /*#__PURE__*/styled.div(_templateObject$9 || (_template
|
|
|
1375
1375
|
const Label$2 = /*#__PURE__*/styled.div(_templateObject2$3 || (_templateObject2$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 4px;\n"])));
|
|
1376
1376
|
|
|
1377
1377
|
const labelClassName$1 = 'd3-chart-label';
|
|
1378
|
-
const drawLabel = _ref => {
|
|
1378
|
+
const drawLabel = (_ref) => {
|
|
1379
1379
|
let {
|
|
1380
1380
|
node,
|
|
1381
1381
|
data,
|
|
@@ -1387,7 +1387,7 @@ const drawLabel = _ref => {
|
|
|
1387
1387
|
const labelsDiv = select(node).append('div').attr('class', labelClassName$1);
|
|
1388
1388
|
const format$1 = format(','); // @ts-ignore
|
|
1389
1389
|
|
|
1390
|
-
data.forEach(_ref2 => {
|
|
1390
|
+
data.forEach((_ref2) => {
|
|
1391
1391
|
let {
|
|
1392
1392
|
values
|
|
1393
1393
|
} = _ref2;
|
|
@@ -1404,7 +1404,7 @@ const drawLabel = _ref => {
|
|
|
1404
1404
|
};
|
|
1405
1405
|
|
|
1406
1406
|
const _excluded$1 = ["values"];
|
|
1407
|
-
const drawTooltip$1 = _ref => {
|
|
1407
|
+
const drawTooltip$1 = (_ref) => {
|
|
1408
1408
|
let {
|
|
1409
1409
|
svg,
|
|
1410
1410
|
node,
|
|
@@ -1422,7 +1422,7 @@ const drawTooltip$1 = _ref => {
|
|
|
1422
1422
|
} = _ref;
|
|
1423
1423
|
const container = tooltipRoot || document.querySelector('body');
|
|
1424
1424
|
const format$1 = format(',');
|
|
1425
|
-
const chartData = argData.filter(_ref2 => {
|
|
1425
|
+
const chartData = argData.filter((_ref2) => {
|
|
1426
1426
|
let {
|
|
1427
1427
|
tooltipOff
|
|
1428
1428
|
} = _ref2;
|
|
@@ -1435,17 +1435,17 @@ const drawTooltip$1 = _ref => {
|
|
|
1435
1435
|
const mouseRect = mouseGlobal.append('rect').attr('width', x2 - x1).attr('height', Math.abs(y1 - y2)).attr('class', lineChartClassNames.lineChartMouseRect).attr('transform', "translate(" + x1 + ", " + y2 + ")");
|
|
1436
1436
|
const mouseLine = mouseGlobal.append('path').attr('class', lineChartClassNames.lineChartMouseLine).style('opacity', '0');
|
|
1437
1437
|
const lines = svg.selectAll("." + lineChartClassNames.lineChartLine).nodes();
|
|
1438
|
-
const circles = mouseGlobal.selectAll('circle').data(chartData.filter(_ref3 => {
|
|
1438
|
+
const circles = mouseGlobal.selectAll('circle').data(chartData.filter((_ref3) => {
|
|
1439
1439
|
let {
|
|
1440
1440
|
dynamicDotOff
|
|
1441
1441
|
} = _ref3;
|
|
1442
1442
|
return !dynamicDotOff;
|
|
1443
|
-
})).join('circle').attr('class', lineChartClassNames.lineChartMouseCircle).attr('r', dynamicCircleRadius).attr('fill', _ref4 => {
|
|
1443
|
+
})).join('circle').attr('class', lineChartClassNames.lineChartMouseCircle).attr('r', dynamicCircleRadius).attr('fill', (_ref4) => {
|
|
1444
1444
|
let {
|
|
1445
1445
|
stroke
|
|
1446
1446
|
} = _ref4;
|
|
1447
1447
|
return stroke || 'none';
|
|
1448
|
-
}).attr('stroke', _ref5 => {
|
|
1448
|
+
}).attr('stroke', (_ref5) => {
|
|
1449
1449
|
let {
|
|
1450
1450
|
stroke
|
|
1451
1451
|
} = _ref5;
|
|
@@ -1510,7 +1510,7 @@ const drawTooltip$1 = _ref => {
|
|
|
1510
1510
|
circles.attr('transform', (lineChartData, index) => {
|
|
1511
1511
|
const value = getValue(lineChartData.values);
|
|
1512
1512
|
return positions[index] && value ? 'translate(' + x + ',' + positions[index].y + ')' : 'translate(-9999, -9999)';
|
|
1513
|
-
}).attr('style', _ref6 => {
|
|
1513
|
+
}).attr('style', (_ref6) => {
|
|
1514
1514
|
let {
|
|
1515
1515
|
dynamicDotStyle
|
|
1516
1516
|
} = _ref6;
|
|
@@ -1527,7 +1527,7 @@ const drawTooltip$1 = _ref => {
|
|
|
1527
1527
|
invertValue: positions[i] ? yScale.invert(positions[i].y) : 0
|
|
1528
1528
|
});
|
|
1529
1529
|
});
|
|
1530
|
-
const noHasData = datas.every(_ref8 => {
|
|
1530
|
+
const noHasData = datas.every((_ref8) => {
|
|
1531
1531
|
let {
|
|
1532
1532
|
value
|
|
1533
1533
|
} = _ref8;
|
|
@@ -1644,13 +1644,13 @@ const draw$3 = (node, props) => {
|
|
|
1644
1644
|
} = node.getBoundingClientRect();
|
|
1645
1645
|
const width = props.width || nodeWidth;
|
|
1646
1646
|
const height = props.height || 0;
|
|
1647
|
-
const min$1 = typeof props.min === 'number' ? props.min : min(data, _ref => {
|
|
1647
|
+
const min$1 = typeof props.min === 'number' ? props.min : min(data, (_ref) => {
|
|
1648
1648
|
let {
|
|
1649
1649
|
values
|
|
1650
1650
|
} = _ref;
|
|
1651
1651
|
return min(values);
|
|
1652
1652
|
});
|
|
1653
|
-
const max$1 = typeof props.max === 'number' ? props.max : max(data, _ref2 => {
|
|
1653
|
+
const max$1 = typeof props.max === 'number' ? props.max : max(data, (_ref2) => {
|
|
1654
1654
|
let {
|
|
1655
1655
|
values
|
|
1656
1656
|
} = _ref2;
|
|
@@ -1707,7 +1707,7 @@ const draw$3 = (node, props) => {
|
|
|
1707
1707
|
|
|
1708
1708
|
const line$1 = line().defined(d => d !== null).x((_, index) => xScale(index)).y(d => yScale(d)).curve(curve || curveLinear);
|
|
1709
1709
|
customLine && customLine(line$1);
|
|
1710
|
-
const withAreas = data.some(_ref4 => {
|
|
1710
|
+
const withAreas = data.some((_ref4) => {
|
|
1711
1711
|
let {
|
|
1712
1712
|
fill
|
|
1713
1713
|
} = _ref4;
|
|
@@ -1740,7 +1740,7 @@ const draw$3 = (node, props) => {
|
|
|
1740
1740
|
}).y1(d => yScale(d)).curve(areaCurve || curve || curveLinear);
|
|
1741
1741
|
};
|
|
1742
1742
|
|
|
1743
|
-
svg.append('g').attr('class', lineChartClassNames.lineChartAreasGlobal).selectAll('path').data(data.filter(_ref5 => {
|
|
1743
|
+
svg.append('g').attr('class', lineChartClassNames.lineChartAreasGlobal).selectAll('path').data(data.filter((_ref5) => {
|
|
1744
1744
|
let {
|
|
1745
1745
|
fill
|
|
1746
1746
|
} = _ref5;
|
|
@@ -1748,12 +1748,12 @@ const draw$3 = (node, props) => {
|
|
|
1748
1748
|
})).join('path').attr('class', lineChartClassNames.lineChartArea).attr('d', d => {
|
|
1749
1749
|
const area = getArea(d);
|
|
1750
1750
|
return area(d.values);
|
|
1751
|
-
}).attr('fill', _ref6 => {
|
|
1751
|
+
}).attr('fill', (_ref6) => {
|
|
1752
1752
|
let {
|
|
1753
1753
|
fill
|
|
1754
1754
|
} = _ref6;
|
|
1755
1755
|
return fill || 'none';
|
|
1756
|
-
}).attr('style', _ref7 => {
|
|
1756
|
+
}).attr('style', (_ref7) => {
|
|
1757
1757
|
let {
|
|
1758
1758
|
areaStyle
|
|
1759
1759
|
} = _ref7;
|
|
@@ -1761,18 +1761,18 @@ const draw$3 = (node, props) => {
|
|
|
1761
1761
|
});
|
|
1762
1762
|
}
|
|
1763
1763
|
|
|
1764
|
-
svg.append('g').attr('class', lineChartClassNames.lineChartLinesGlobal).selectAll('path').data(data).join('path').attr('class', lineChartClassNames.lineChartLine).attr('d', d => line$1(d.values)).attr('stroke', _ref8 => {
|
|
1764
|
+
svg.append('g').attr('class', lineChartClassNames.lineChartLinesGlobal).selectAll('path').data(data).join('path').attr('class', lineChartClassNames.lineChartLine).attr('d', d => line$1(d.values)).attr('stroke', (_ref8) => {
|
|
1765
1765
|
let {
|
|
1766
1766
|
stroke
|
|
1767
1767
|
} = _ref8;
|
|
1768
1768
|
return stroke || 'steelblue';
|
|
1769
|
-
}).attr('style', _ref9 => {
|
|
1769
|
+
}).attr('style', (_ref9) => {
|
|
1770
1770
|
let {
|
|
1771
1771
|
style
|
|
1772
1772
|
} = _ref9;
|
|
1773
1773
|
return style || '';
|
|
1774
1774
|
});
|
|
1775
|
-
const dots = data.filter(_ref10 => {
|
|
1775
|
+
const dots = data.filter((_ref10) => {
|
|
1776
1776
|
let {
|
|
1777
1777
|
dot
|
|
1778
1778
|
} = _ref10;
|
|
@@ -1878,7 +1878,7 @@ const barChartLinesClassNames = {
|
|
|
1878
1878
|
barChartAreasGlobal: 'barChartAreasGlobal',
|
|
1879
1879
|
barChartArea: 'barChartArea'
|
|
1880
1880
|
};
|
|
1881
|
-
const drawLines = _ref => {
|
|
1881
|
+
const drawLines = (_ref) => {
|
|
1882
1882
|
let {
|
|
1883
1883
|
svg,
|
|
1884
1884
|
lineData,
|
|
@@ -1894,13 +1894,13 @@ const drawLines = _ref => {
|
|
|
1894
1894
|
const line$1 = line().defined(d => d !== null).x((_, index) => xScale(index) + bandwidth / 2) // @ts-ignore
|
|
1895
1895
|
.y(d => yScale(d)).curve(curve || curveLinear);
|
|
1896
1896
|
const bandwidth = xScale.bandwidth();
|
|
1897
|
-
const linesData = lineData.filter(_ref2 => {
|
|
1897
|
+
const linesData = lineData.filter((_ref2) => {
|
|
1898
1898
|
let {
|
|
1899
1899
|
lineType
|
|
1900
1900
|
} = _ref2;
|
|
1901
1901
|
return lineType === 'line';
|
|
1902
1902
|
});
|
|
1903
|
-
const areasData = lineData.filter(_ref3 => {
|
|
1903
|
+
const areasData = lineData.filter((_ref3) => {
|
|
1904
1904
|
let {
|
|
1905
1905
|
lineType
|
|
1906
1906
|
} = _ref3;
|
|
@@ -1908,12 +1908,12 @@ const drawLines = _ref => {
|
|
|
1908
1908
|
});
|
|
1909
1909
|
|
|
1910
1910
|
if (linesData.length > 0) {
|
|
1911
|
-
linesSelection = svg.append('g').attr('class', barChartLinesClassNames.barChartLinesGlobal).selectAll('path').data(linesData).join('path').attr('class', barChartLinesClassNames.barChartLine).attr('d', d => line$1(d.values)).attr('stroke', _ref4 => {
|
|
1911
|
+
linesSelection = svg.append('g').attr('class', barChartLinesClassNames.barChartLinesGlobal).selectAll('path').data(linesData).join('path').attr('class', barChartLinesClassNames.barChartLine).attr('d', d => line$1(d.values)).attr('stroke', (_ref4) => {
|
|
1912
1912
|
let {
|
|
1913
1913
|
stroke
|
|
1914
1914
|
} = _ref4;
|
|
1915
1915
|
return stroke || '';
|
|
1916
|
-
}).attr('fill', _ref5 => {
|
|
1916
|
+
}).attr('fill', (_ref5) => {
|
|
1917
1917
|
let {
|
|
1918
1918
|
fill
|
|
1919
1919
|
} = _ref5;
|
|
@@ -1931,7 +1931,7 @@ const drawLines = _ref => {
|
|
|
1931
1931
|
return stackedLine ? dataIndex > -1 ? yScale(typeof lineData[dataIndex].values[index] !== 'number' ? 0 : lineData[dataIndex].values[index]) : yScale(min) : yScale(min);
|
|
1932
1932
|
}) // @ts-ignore
|
|
1933
1933
|
.y1(d => yScale(d)).curve(curve || curveLinear);
|
|
1934
|
-
areasSelection = svg.append('g').attr('class', barChartLinesClassNames.barChartAreasGlobal).selectAll('path').data(areasData).join('path').attr('class', barChartLinesClassNames.barChartArea).attr('d', d => area$1 && area$1(d.values)).attr('fill', _ref6 => {
|
|
1934
|
+
areasSelection = svg.append('g').attr('class', barChartLinesClassNames.barChartAreasGlobal).selectAll('path').data(areasData).join('path').attr('class', barChartLinesClassNames.barChartArea).attr('d', d => area$1 && area$1(d.values)).attr('fill', (_ref6) => {
|
|
1935
1935
|
let {
|
|
1936
1936
|
fill
|
|
1937
1937
|
} = _ref6;
|
|
@@ -1981,7 +1981,7 @@ const barChartClassNames = /*#__PURE__*/_extends({
|
|
|
1981
1981
|
const SvgWrapper$4 = /*#__PURE__*/styled(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);
|
|
1982
1982
|
const TooltipStyles$1 = /*#__PURE__*/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);
|
|
1983
1983
|
|
|
1984
|
-
const drawGrid$1 = _ref => {
|
|
1984
|
+
const drawGrid$1 = (_ref) => {
|
|
1985
1985
|
let {
|
|
1986
1986
|
svg,
|
|
1987
1987
|
yScale,
|
|
@@ -2010,7 +2010,7 @@ const drawGrid$1 = _ref => {
|
|
|
2010
2010
|
};
|
|
2011
2011
|
|
|
2012
2012
|
const _excluded$2 = ["groupName"];
|
|
2013
|
-
const getDomain = _ref => {
|
|
2013
|
+
const getDomain = (_ref) => {
|
|
2014
2014
|
let {
|
|
2015
2015
|
data,
|
|
2016
2016
|
minDomainValue,
|
|
@@ -2018,7 +2018,7 @@ const getDomain = _ref => {
|
|
|
2018
2018
|
} = _ref;
|
|
2019
2019
|
let MIN = Number.POSITIVE_INFINITY;
|
|
2020
2020
|
let MAX = Number.NEGATIVE_INFINITY;
|
|
2021
|
-
data.forEach(_ref2 => {
|
|
2021
|
+
data.forEach((_ref2) => {
|
|
2022
2022
|
let groups = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
|
|
2023
2023
|
|
|
2024
2024
|
let groupMax = 0;
|
|
@@ -2057,7 +2057,7 @@ const getDomain = _ref => {
|
|
|
2057
2057
|
};
|
|
2058
2058
|
|
|
2059
2059
|
const _excluded$3 = ["groupName"];
|
|
2060
|
-
const marshaling = _ref => {
|
|
2060
|
+
const marshaling = (_ref) => {
|
|
2061
2061
|
let {
|
|
2062
2062
|
data,
|
|
2063
2063
|
yScale,
|
|
@@ -2143,7 +2143,7 @@ const getLabel = labelPosition => {
|
|
|
2143
2143
|
};
|
|
2144
2144
|
|
|
2145
2145
|
const _excluded$4 = ["values"];
|
|
2146
|
-
const drawTooltip$2 = _ref => {
|
|
2146
|
+
const drawTooltip$2 = (_ref) => {
|
|
2147
2147
|
let {
|
|
2148
2148
|
svg,
|
|
2149
2149
|
node,
|
|
@@ -2186,7 +2186,7 @@ const drawTooltip$2 = _ref => {
|
|
|
2186
2186
|
lineData,
|
|
2187
2187
|
yScale
|
|
2188
2188
|
}) : marshalledData.reduce((acc, curr, index) => {
|
|
2189
|
-
const lineMin = min(lineData, _ref2 => {
|
|
2189
|
+
const lineMin = min(lineData, (_ref2) => {
|
|
2190
2190
|
let {
|
|
2191
2191
|
values
|
|
2192
2192
|
} = _ref2;
|
|
@@ -2278,7 +2278,7 @@ const drawTooltip$2 = _ref => {
|
|
|
2278
2278
|
}
|
|
2279
2279
|
|
|
2280
2280
|
if (lineData) {
|
|
2281
|
-
const currLineData = lineData.map(_ref4 => {
|
|
2281
|
+
const currLineData = lineData.map((_ref4) => {
|
|
2282
2282
|
let {
|
|
2283
2283
|
values
|
|
2284
2284
|
} = _ref4,
|
|
@@ -2328,7 +2328,7 @@ const drawTooltip$2 = _ref => {
|
|
|
2328
2328
|
className: barChartClassNames.barChartTooltip
|
|
2329
2329
|
}, currData && currData[0] && React.createElement(TooltipGroupName, {
|
|
2330
2330
|
className: barChartClassNames.barChartTooltipGroupName
|
|
2331
|
-
}, currData[0].groupName), currData && currData.map(_ref5 => {
|
|
2331
|
+
}, currData[0].groupName), currData && currData.map((_ref5) => {
|
|
2332
2332
|
let {
|
|
2333
2333
|
name,
|
|
2334
2334
|
value,
|
|
@@ -2374,7 +2374,7 @@ const drawTooltip$2 = _ref => {
|
|
|
2374
2374
|
const labelContainer = container.append('div').attr('class', barChartClassNames.barChartLabelContainer).style('position', 'absolute').style('top', y2 + "px");
|
|
2375
2375
|
|
|
2376
2376
|
if (labelPosition) {
|
|
2377
|
-
const concatedData = lineData ? marshalledData.map((stack, index) => stack.concat(lineData.map(_ref6 => {
|
|
2377
|
+
const concatedData = lineData ? marshalledData.map((stack, index) => stack.concat(lineData.map((_ref6) => {
|
|
2378
2378
|
let {
|
|
2379
2379
|
values,
|
|
2380
2380
|
name,
|
|
@@ -2430,7 +2430,7 @@ const drawTooltip$2 = _ref => {
|
|
|
2430
2430
|
};
|
|
2431
2431
|
|
|
2432
2432
|
const _excluded$5 = ["groupName"];
|
|
2433
|
-
const resizeBarWidth = _ref => {
|
|
2433
|
+
const resizeBarWidth = (_ref) => {
|
|
2434
2434
|
let {
|
|
2435
2435
|
data,
|
|
2436
2436
|
range,
|
|
@@ -2453,7 +2453,7 @@ const resizeBarWidth = _ref => {
|
|
|
2453
2453
|
return barWidth;
|
|
2454
2454
|
};
|
|
2455
2455
|
|
|
2456
|
-
const getBars = _ref => {
|
|
2456
|
+
const getBars = (_ref) => {
|
|
2457
2457
|
let {
|
|
2458
2458
|
groups,
|
|
2459
2459
|
barWidth
|
|
@@ -2524,13 +2524,13 @@ const draw$4 = (node, props) => {
|
|
|
2524
2524
|
minDomainValue,
|
|
2525
2525
|
maxDomainValue
|
|
2526
2526
|
});
|
|
2527
|
-
const min$1 = typeof minValue === 'number' ? minValue : Math.min(min(lineData, _ref => {
|
|
2527
|
+
const min$1 = typeof minValue === 'number' ? minValue : Math.min(min(lineData, (_ref) => {
|
|
2528
2528
|
let {
|
|
2529
2529
|
values
|
|
2530
2530
|
} = _ref;
|
|
2531
2531
|
return min(values);
|
|
2532
2532
|
}) || Number.POSITIVE_INFINITY, barDomain.min || 0);
|
|
2533
|
-
const max$1 = typeof maxValue === 'number' ? maxValue : Math.max(max(lineData, _ref2 => {
|
|
2533
|
+
const max$1 = typeof maxValue === 'number' ? maxValue : Math.max(max(lineData, (_ref2) => {
|
|
2534
2534
|
let {
|
|
2535
2535
|
values
|
|
2536
2536
|
} = _ref2;
|
|
@@ -2717,7 +2717,7 @@ BarChart.defaultProps = {
|
|
|
2717
2717
|
|
|
2718
2718
|
const _excluded$6 = ["value"];
|
|
2719
2719
|
const hundred = 100;
|
|
2720
|
-
const useMarshaling = _ref => {
|
|
2720
|
+
const useMarshaling = (_ref) => {
|
|
2721
2721
|
let {
|
|
2722
2722
|
data,
|
|
2723
2723
|
fullExtent,
|
|
@@ -2725,7 +2725,7 @@ const useMarshaling = _ref => {
|
|
|
2725
2725
|
labels
|
|
2726
2726
|
} = _ref;
|
|
2727
2727
|
return useMemo(() => {
|
|
2728
|
-
const fullMax = max(data, item => sum(item, _ref2 => {
|
|
2728
|
+
const fullMax = max(data, item => sum(item, (_ref2) => {
|
|
2729
2729
|
let {
|
|
2730
2730
|
value
|
|
2731
2731
|
} = _ref2;
|
|
@@ -2736,7 +2736,7 @@ const useMarshaling = _ref => {
|
|
|
2736
2736
|
fullMax,
|
|
2737
2737
|
data: data.map((item, index) => {
|
|
2738
2738
|
if (!fullExtent) {
|
|
2739
|
-
scaleLinear$1.domain([0, typeof maxValue === 'number' ? maxValue : sum(item, _ref3 => {
|
|
2739
|
+
scaleLinear$1.domain([0, typeof maxValue === 'number' ? maxValue : sum(item, (_ref3) => {
|
|
2740
2740
|
let {
|
|
2741
2741
|
value
|
|
2742
2742
|
} = _ref3;
|
|
@@ -2744,7 +2744,7 @@ const useMarshaling = _ref => {
|
|
|
2744
2744
|
})]);
|
|
2745
2745
|
}
|
|
2746
2746
|
|
|
2747
|
-
return item.map(_ref4 => {
|
|
2747
|
+
return item.map((_ref4) => {
|
|
2748
2748
|
let {
|
|
2749
2749
|
value
|
|
2750
2750
|
} = _ref4,
|
|
@@ -2793,7 +2793,7 @@ const StackSumContainer = /*#__PURE__*/styled.div(_templateObject6$2 || (_templa
|
|
|
2793
2793
|
const StackSum = /*#__PURE__*/styled.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"])));
|
|
2794
2794
|
const StackWrapper = /*#__PURE__*/styled.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"])));
|
|
2795
2795
|
|
|
2796
|
-
const Tooltip = _ref => {
|
|
2796
|
+
const Tooltip = (_ref) => {
|
|
2797
2797
|
let {
|
|
2798
2798
|
renderTooltip,
|
|
2799
2799
|
bars,
|
|
@@ -2829,7 +2829,7 @@ const Tooltip = _ref => {
|
|
|
2829
2829
|
};
|
|
2830
2830
|
|
|
2831
2831
|
const rootElement = /*#__PURE__*/document.createElement('div');
|
|
2832
|
-
const useTooltip = _ref => {
|
|
2832
|
+
const useTooltip = (_ref) => {
|
|
2833
2833
|
let {
|
|
2834
2834
|
renderTooltip,
|
|
2835
2835
|
tooltipBind,
|
|
@@ -2883,7 +2883,7 @@ const useTooltip = _ref => {
|
|
|
2883
2883
|
|
|
2884
2884
|
const _excluded$7 = ["item", "mouseMove", "mouseLeave", "tooltipBind"];
|
|
2885
2885
|
const useStackWrapper = stackedTooltip => {
|
|
2886
|
-
return useMemo(() => stackedTooltip ? _ref => {
|
|
2886
|
+
return useMemo(() => stackedTooltip ? (_ref) => {
|
|
2887
2887
|
let {
|
|
2888
2888
|
item,
|
|
2889
2889
|
mouseMove,
|
|
@@ -2898,7 +2898,7 @@ const useStackWrapper = stackedTooltip => {
|
|
|
2898
2898
|
onMouseMove: tooltipBind ? event => mouseMove(event, item) : void 0,
|
|
2899
2899
|
onMouseOut: mouseLeave
|
|
2900
2900
|
}, props));
|
|
2901
|
-
} : _ref2 => {
|
|
2901
|
+
} : (_ref2) => {
|
|
2902
2902
|
let {
|
|
2903
2903
|
children
|
|
2904
2904
|
} = _ref2;
|
|
@@ -2909,7 +2909,7 @@ const useStackWrapper = stackedTooltip => {
|
|
|
2909
2909
|
var _templateObject$c;
|
|
2910
2910
|
const BarStyled = /*#__PURE__*/styled.div(_templateObject$c || (_templateObject$c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n display: inline-flex;\n height: 100%;\n"])));
|
|
2911
2911
|
|
|
2912
|
-
const Bar = _ref => {
|
|
2912
|
+
const Bar = (_ref) => {
|
|
2913
2913
|
let {
|
|
2914
2914
|
withTooltip,
|
|
2915
2915
|
bar,
|
|
@@ -2944,7 +2944,7 @@ const Bar = _ref => {
|
|
|
2944
2944
|
};
|
|
2945
2945
|
|
|
2946
2946
|
const hundred$1 = 100;
|
|
2947
|
-
const useScale = _ref => {
|
|
2947
|
+
const useScale = (_ref) => {
|
|
2948
2948
|
let {
|
|
2949
2949
|
maxValue,
|
|
2950
2950
|
scaleTicks,
|
|
@@ -2965,7 +2965,7 @@ const TickTd = /*#__PURE__*/styled.td(_templateObject$d || (_templateObject$d =
|
|
|
2965
2965
|
const Ticks = /*#__PURE__*/styled.div(_templateObject2$6 || (_templateObject2$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n height: 1rem;\n"])));
|
|
2966
2966
|
const Tick = /*#__PURE__*/styled.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"])));
|
|
2967
2967
|
|
|
2968
|
-
const XScale = _ref => {
|
|
2968
|
+
const XScale = (_ref) => {
|
|
2969
2969
|
let {
|
|
2970
2970
|
maxValue,
|
|
2971
2971
|
scaleTicks,
|
|
@@ -2998,7 +2998,7 @@ const XScale = _ref => {
|
|
|
2998
2998
|
}))));
|
|
2999
2999
|
};
|
|
3000
3000
|
|
|
3001
|
-
const HorizontalBarChart = _ref => {
|
|
3001
|
+
const HorizontalBarChart = (_ref) => {
|
|
3002
3002
|
let {
|
|
3003
3003
|
data,
|
|
3004
3004
|
className,
|
|
@@ -3049,13 +3049,13 @@ const HorizontalBarChart = _ref => {
|
|
|
3049
3049
|
onMouseMove: fullChartTooltip ? event => mouseMove(event, marshalingData.flat()) : void 0,
|
|
3050
3050
|
onMouseOut: fullChartTooltip ? mouseLeave : void 0
|
|
3051
3051
|
}, thead, React.createElement("tbody", null, marshalingData.map((item, rowIndex) => {
|
|
3052
|
-
const stackSum = (withStackSum || renderDataTable) && sum(item, _ref2 => {
|
|
3052
|
+
const stackSum = (withStackSum || renderDataTable) && sum(item, (_ref2) => {
|
|
3053
3053
|
let {
|
|
3054
3054
|
value
|
|
3055
3055
|
} = _ref2;
|
|
3056
3056
|
return value;
|
|
3057
3057
|
});
|
|
3058
|
-
const sumWidth = sum(item, _ref3 => {
|
|
3058
|
+
const sumWidth = sum(item, (_ref3) => {
|
|
3059
3059
|
let {
|
|
3060
3060
|
width
|
|
3061
3061
|
} = _ref3;
|
|
@@ -3153,7 +3153,7 @@ const bubbleChartClassNames = {
|
|
|
3153
3153
|
const SvgWrapper$5 = /*#__PURE__*/styled(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);
|
|
3154
3154
|
const TooltipStyles$2 = /*#__PURE__*/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);
|
|
3155
3155
|
|
|
3156
|
-
const drawGrid$2 = _ref => {
|
|
3156
|
+
const drawGrid$2 = (_ref) => {
|
|
3157
3157
|
let {
|
|
3158
3158
|
svg,
|
|
3159
3159
|
yScale,
|
|
@@ -3179,7 +3179,7 @@ const drawGrid$2 = _ref => {
|
|
|
3179
3179
|
var _templateObject$f;
|
|
3180
3180
|
const Tooltip$1 = /*#__PURE__*/styled.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"])));
|
|
3181
3181
|
|
|
3182
|
-
const drawTooltip$3 = _ref => {
|
|
3182
|
+
const drawTooltip$3 = (_ref) => {
|
|
3183
3183
|
let {
|
|
3184
3184
|
bubbles,
|
|
3185
3185
|
tooltipRoot,
|
|
@@ -3265,25 +3265,25 @@ const draw$5 = (node, props) => {
|
|
|
3265
3265
|
const width = props.width || nodeWidth;
|
|
3266
3266
|
const height = props.height || 0;
|
|
3267
3267
|
const yTicksCountDefault = 6;
|
|
3268
|
-
const minY = typeof minYValue === 'number' ? minYValue : min(data, _ref => {
|
|
3268
|
+
const minY = typeof minYValue === 'number' ? minYValue : min(data, (_ref) => {
|
|
3269
3269
|
let {
|
|
3270
3270
|
yValue
|
|
3271
3271
|
} = _ref;
|
|
3272
3272
|
return yValue;
|
|
3273
3273
|
});
|
|
3274
|
-
const maxY = typeof maxYValue === 'number' ? maxYValue : max(data, _ref2 => {
|
|
3274
|
+
const maxY = typeof maxYValue === 'number' ? maxYValue : max(data, (_ref2) => {
|
|
3275
3275
|
let {
|
|
3276
3276
|
yValue
|
|
3277
3277
|
} = _ref2;
|
|
3278
3278
|
return yValue;
|
|
3279
3279
|
});
|
|
3280
3280
|
const svg = appendSvg(node, width, height || 0);
|
|
3281
|
-
const sizeScale = scaleLinear().domain([min(data, _ref3 => {
|
|
3281
|
+
const sizeScale = scaleLinear().domain([min(data, (_ref3) => {
|
|
3282
3282
|
let {
|
|
3283
3283
|
sizeValue
|
|
3284
3284
|
} = _ref3;
|
|
3285
3285
|
return sizeValue;
|
|
3286
|
-
}), max(data, _ref4 => {
|
|
3286
|
+
}), max(data, (_ref4) => {
|
|
3287
3287
|
let {
|
|
3288
3288
|
sizeValue
|
|
3289
3289
|
} = _ref4;
|
|
@@ -3316,12 +3316,12 @@ const draw$5 = (node, props) => {
|
|
|
3316
3316
|
width: yAxisWidth
|
|
3317
3317
|
} = computeDimensions(yAxis);
|
|
3318
3318
|
const range = [marginLeft + yAxisWidth + (yAxisPadding || 0) + yScaleLabelHeight, width - marginRight];
|
|
3319
|
-
const xScale = scaleLinear().domain([min(data, _ref5 => {
|
|
3319
|
+
const xScale = scaleLinear().domain([min(data, (_ref5) => {
|
|
3320
3320
|
let {
|
|
3321
3321
|
xValue
|
|
3322
3322
|
} = _ref5;
|
|
3323
3323
|
return xValue;
|
|
3324
|
-
}), max(data, _ref6 => {
|
|
3324
|
+
}), max(data, (_ref6) => {
|
|
3325
3325
|
let {
|
|
3326
3326
|
xValue
|
|
3327
3327
|
} = _ref6;
|
|
@@ -3348,32 +3348,32 @@ const draw$5 = (node, props) => {
|
|
|
3348
3348
|
drawGridX
|
|
3349
3349
|
});
|
|
3350
3350
|
xAxis.attr('transform', "translate(0, " + (yScale(yTicks[0]) + (xAxisPadding || 0)) + ")");
|
|
3351
|
-
const bubbles = svg.append('g').selectAll('dot').data(data).enter().append('circle').attr('class', bubbleChartClassNames.bubbleChartCircle).attr('cx', _ref7 => {
|
|
3351
|
+
const bubbles = svg.append('g').selectAll('dot').data(data).enter().append('circle').attr('class', bubbleChartClassNames.bubbleChartCircle).attr('cx', (_ref7) => {
|
|
3352
3352
|
let {
|
|
3353
3353
|
xValue
|
|
3354
3354
|
} = _ref7;
|
|
3355
3355
|
return xScale(xValue);
|
|
3356
|
-
}).attr('cy', _ref8 => {
|
|
3356
|
+
}).attr('cy', (_ref8) => {
|
|
3357
3357
|
let {
|
|
3358
3358
|
yValue
|
|
3359
3359
|
} = _ref8;
|
|
3360
3360
|
return yScale(yValue);
|
|
3361
|
-
}).attr('r', _ref9 => {
|
|
3361
|
+
}).attr('r', (_ref9) => {
|
|
3362
3362
|
let {
|
|
3363
3363
|
sizeValue
|
|
3364
3364
|
} = _ref9;
|
|
3365
3365
|
return sizeScale(sizeValue) / 2;
|
|
3366
|
-
}).attr('fill', _ref10 => {
|
|
3366
|
+
}).attr('fill', (_ref10) => {
|
|
3367
3367
|
let {
|
|
3368
3368
|
color
|
|
3369
3369
|
} = _ref10;
|
|
3370
3370
|
return color || 'rgba(0, 176, 113, 0.6)';
|
|
3371
|
-
}).attr('stroke', _ref11 => {
|
|
3371
|
+
}).attr('stroke', (_ref11) => {
|
|
3372
3372
|
let {
|
|
3373
3373
|
stroke
|
|
3374
3374
|
} = _ref11;
|
|
3375
3375
|
return stroke || 'transparent';
|
|
3376
|
-
}).attr('style', _ref12 => {
|
|
3376
|
+
}).attr('style', (_ref12) => {
|
|
3377
3377
|
let {
|
|
3378
3378
|
style
|
|
3379
3379
|
} = _ref12;
|