@evergis/charts 2.0.56 → 2.0.57
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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 =
|
|
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 =
|
|
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(
|
|
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(
|
|
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',
|
|
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 =
|
|
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
|
-
|
|
1114
|
-
}
|
|
1112
|
+
if (typeof tickFormat !== 'function') {
|
|
1113
|
+
tickFormat = format(tickFormat === undefined ? ',f' : tickFormat);
|
|
1115
1114
|
}
|
|
1116
1115
|
}
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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 =
|
|
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 =
|
|
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(
|
|
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 =
|
|
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(
|
|
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(
|
|
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',
|
|
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',
|
|
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',
|
|
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(
|
|
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,
|
|
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,
|
|
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(
|
|
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(
|
|
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',
|
|
1751
|
+
}).attr('fill', _ref6 => {
|
|
1752
1752
|
let {
|
|
1753
1753
|
fill
|
|
1754
1754
|
} = _ref6;
|
|
1755
1755
|
return fill || 'none';
|
|
1756
|
-
}).attr('style',
|
|
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',
|
|
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',
|
|
1769
|
+
}).attr('style', _ref9 => {
|
|
1770
1770
|
let {
|
|
1771
1771
|
style
|
|
1772
1772
|
} = _ref9;
|
|
1773
1773
|
return style || '';
|
|
1774
1774
|
});
|
|
1775
|
-
const dots = data.filter(
|
|
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 =
|
|
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(
|
|
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(
|
|
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',
|
|
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',
|
|
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',
|
|
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 =
|
|
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 =
|
|
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(
|
|
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 =
|
|
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 =
|
|
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,
|
|
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(
|
|
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(
|
|
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(
|
|
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 =
|
|
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 =
|
|
2456
|
+
const getBars = _ref => {
|
|
2457
2457
|
let {
|
|
2458
2458
|
groups,
|
|
2459
2459
|
barWidth
|
|
@@ -2525,13 +2525,13 @@ const draw$4 = (node, props) => {
|
|
|
2525
2525
|
minDomainValue,
|
|
2526
2526
|
maxDomainValue
|
|
2527
2527
|
});
|
|
2528
|
-
const min$1 = typeof minValue === 'number' ? minValue : Math.min(min(lineData,
|
|
2528
|
+
const min$1 = typeof minValue === 'number' ? minValue : Math.min(min(lineData, _ref => {
|
|
2529
2529
|
let {
|
|
2530
2530
|
values
|
|
2531
2531
|
} = _ref;
|
|
2532
2532
|
return min(values);
|
|
2533
2533
|
}) || Number.POSITIVE_INFINITY, barDomain.min || 0);
|
|
2534
|
-
const max$1 = typeof maxValue === 'number' ? maxValue : Math.max(max(lineData,
|
|
2534
|
+
const max$1 = typeof maxValue === 'number' ? maxValue : Math.max(max(lineData, _ref2 => {
|
|
2535
2535
|
let {
|
|
2536
2536
|
values
|
|
2537
2537
|
} = _ref2;
|
|
@@ -2726,7 +2726,7 @@ BarChart.defaultProps = {
|
|
|
2726
2726
|
|
|
2727
2727
|
const _excluded$6 = ["value"];
|
|
2728
2728
|
const hundred = 100;
|
|
2729
|
-
const useMarshaling =
|
|
2729
|
+
const useMarshaling = _ref => {
|
|
2730
2730
|
let {
|
|
2731
2731
|
data,
|
|
2732
2732
|
fullExtent,
|
|
@@ -2734,7 +2734,7 @@ const useMarshaling = (_ref) => {
|
|
|
2734
2734
|
labels
|
|
2735
2735
|
} = _ref;
|
|
2736
2736
|
return useMemo(() => {
|
|
2737
|
-
const fullMax = max(data, item => sum(item,
|
|
2737
|
+
const fullMax = max(data, item => sum(item, _ref2 => {
|
|
2738
2738
|
let {
|
|
2739
2739
|
value
|
|
2740
2740
|
} = _ref2;
|
|
@@ -2745,7 +2745,7 @@ const useMarshaling = (_ref) => {
|
|
|
2745
2745
|
fullMax,
|
|
2746
2746
|
data: data.map((item, index) => {
|
|
2747
2747
|
if (!fullExtent) {
|
|
2748
|
-
scaleLinear$1.domain([0, typeof maxValue === 'number' ? maxValue : sum(item,
|
|
2748
|
+
scaleLinear$1.domain([0, typeof maxValue === 'number' ? maxValue : sum(item, _ref3 => {
|
|
2749
2749
|
let {
|
|
2750
2750
|
value
|
|
2751
2751
|
} = _ref3;
|
|
@@ -2753,7 +2753,7 @@ const useMarshaling = (_ref) => {
|
|
|
2753
2753
|
})]);
|
|
2754
2754
|
}
|
|
2755
2755
|
|
|
2756
|
-
return item.map(
|
|
2756
|
+
return item.map(_ref4 => {
|
|
2757
2757
|
let {
|
|
2758
2758
|
value
|
|
2759
2759
|
} = _ref4,
|
|
@@ -2802,7 +2802,7 @@ const StackSumContainer = /*#__PURE__*/styled.div(_templateObject6$2 || (_templa
|
|
|
2802
2802
|
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"])));
|
|
2803
2803
|
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"])));
|
|
2804
2804
|
|
|
2805
|
-
const Tooltip =
|
|
2805
|
+
const Tooltip = _ref => {
|
|
2806
2806
|
let {
|
|
2807
2807
|
renderTooltip,
|
|
2808
2808
|
bars,
|
|
@@ -2838,7 +2838,7 @@ const Tooltip = (_ref) => {
|
|
|
2838
2838
|
};
|
|
2839
2839
|
|
|
2840
2840
|
const rootElement = /*#__PURE__*/document.createElement('div');
|
|
2841
|
-
const useTooltip =
|
|
2841
|
+
const useTooltip = _ref => {
|
|
2842
2842
|
let {
|
|
2843
2843
|
renderTooltip,
|
|
2844
2844
|
tooltipBind,
|
|
@@ -2892,7 +2892,7 @@ const useTooltip = (_ref) => {
|
|
|
2892
2892
|
|
|
2893
2893
|
const _excluded$7 = ["item", "mouseMove", "mouseLeave", "tooltipBind"];
|
|
2894
2894
|
const useStackWrapper = stackedTooltip => {
|
|
2895
|
-
return useMemo(() => stackedTooltip ?
|
|
2895
|
+
return useMemo(() => stackedTooltip ? _ref => {
|
|
2896
2896
|
let {
|
|
2897
2897
|
item,
|
|
2898
2898
|
mouseMove,
|
|
@@ -2907,7 +2907,7 @@ const useStackWrapper = stackedTooltip => {
|
|
|
2907
2907
|
onMouseMove: tooltipBind ? event => mouseMove(event, item) : void 0,
|
|
2908
2908
|
onMouseOut: mouseLeave
|
|
2909
2909
|
}, props));
|
|
2910
|
-
} :
|
|
2910
|
+
} : _ref2 => {
|
|
2911
2911
|
let {
|
|
2912
2912
|
children
|
|
2913
2913
|
} = _ref2;
|
|
@@ -2918,7 +2918,7 @@ const useStackWrapper = stackedTooltip => {
|
|
|
2918
2918
|
var _templateObject$c;
|
|
2919
2919
|
const BarStyled = /*#__PURE__*/styled.div(_templateObject$c || (_templateObject$c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n display: inline-flex;\n height: 100%;\n"])));
|
|
2920
2920
|
|
|
2921
|
-
const Bar =
|
|
2921
|
+
const Bar = _ref => {
|
|
2922
2922
|
let {
|
|
2923
2923
|
withTooltip,
|
|
2924
2924
|
bar,
|
|
@@ -2953,7 +2953,7 @@ const Bar = (_ref) => {
|
|
|
2953
2953
|
};
|
|
2954
2954
|
|
|
2955
2955
|
const hundred$1 = 100;
|
|
2956
|
-
const useScale =
|
|
2956
|
+
const useScale = _ref => {
|
|
2957
2957
|
let {
|
|
2958
2958
|
maxValue,
|
|
2959
2959
|
scaleTicks,
|
|
@@ -2974,7 +2974,7 @@ const TickTd = /*#__PURE__*/styled.td(_templateObject$d || (_templateObject$d =
|
|
|
2974
2974
|
const Ticks = /*#__PURE__*/styled.div(_templateObject2$6 || (_templateObject2$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n height: 1rem;\n"])));
|
|
2975
2975
|
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"])));
|
|
2976
2976
|
|
|
2977
|
-
const XScale =
|
|
2977
|
+
const XScale = _ref => {
|
|
2978
2978
|
let {
|
|
2979
2979
|
maxValue,
|
|
2980
2980
|
scaleTicks,
|
|
@@ -3007,7 +3007,7 @@ const XScale = (_ref) => {
|
|
|
3007
3007
|
}))));
|
|
3008
3008
|
};
|
|
3009
3009
|
|
|
3010
|
-
const HorizontalBarChart =
|
|
3010
|
+
const HorizontalBarChart = _ref => {
|
|
3011
3011
|
let {
|
|
3012
3012
|
data,
|
|
3013
3013
|
className,
|
|
@@ -3058,13 +3058,13 @@ const HorizontalBarChart = (_ref) => {
|
|
|
3058
3058
|
onMouseMove: fullChartTooltip ? event => mouseMove(event, marshalingData.flat()) : void 0,
|
|
3059
3059
|
onMouseOut: fullChartTooltip ? mouseLeave : void 0
|
|
3060
3060
|
}, thead, React.createElement("tbody", null, marshalingData.map((item, rowIndex) => {
|
|
3061
|
-
const stackSum = (withStackSum || renderDataTable) && sum(item,
|
|
3061
|
+
const stackSum = (withStackSum || renderDataTable) && sum(item, _ref2 => {
|
|
3062
3062
|
let {
|
|
3063
3063
|
value
|
|
3064
3064
|
} = _ref2;
|
|
3065
3065
|
return value;
|
|
3066
3066
|
});
|
|
3067
|
-
const sumWidth = sum(item,
|
|
3067
|
+
const sumWidth = sum(item, _ref3 => {
|
|
3068
3068
|
let {
|
|
3069
3069
|
width
|
|
3070
3070
|
} = _ref3;
|
|
@@ -3162,7 +3162,7 @@ const bubbleChartClassNames = {
|
|
|
3162
3162
|
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);
|
|
3163
3163
|
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);
|
|
3164
3164
|
|
|
3165
|
-
const drawGrid$2 =
|
|
3165
|
+
const drawGrid$2 = _ref => {
|
|
3166
3166
|
let {
|
|
3167
3167
|
svg,
|
|
3168
3168
|
yScale,
|
|
@@ -3188,7 +3188,7 @@ const drawGrid$2 = (_ref) => {
|
|
|
3188
3188
|
var _templateObject$f;
|
|
3189
3189
|
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"])));
|
|
3190
3190
|
|
|
3191
|
-
const drawTooltip$3 =
|
|
3191
|
+
const drawTooltip$3 = _ref => {
|
|
3192
3192
|
let {
|
|
3193
3193
|
bubbles,
|
|
3194
3194
|
tooltipRoot,
|
|
@@ -3274,25 +3274,25 @@ const draw$5 = (node, props) => {
|
|
|
3274
3274
|
const width = props.width || nodeWidth;
|
|
3275
3275
|
const height = props.height || 0;
|
|
3276
3276
|
const yTicksCountDefault = 6;
|
|
3277
|
-
const minY = typeof minYValue === 'number' ? minYValue : min(data,
|
|
3277
|
+
const minY = typeof minYValue === 'number' ? minYValue : min(data, _ref => {
|
|
3278
3278
|
let {
|
|
3279
3279
|
yValue
|
|
3280
3280
|
} = _ref;
|
|
3281
3281
|
return yValue;
|
|
3282
3282
|
});
|
|
3283
|
-
const maxY = typeof maxYValue === 'number' ? maxYValue : max(data,
|
|
3283
|
+
const maxY = typeof maxYValue === 'number' ? maxYValue : max(data, _ref2 => {
|
|
3284
3284
|
let {
|
|
3285
3285
|
yValue
|
|
3286
3286
|
} = _ref2;
|
|
3287
3287
|
return yValue;
|
|
3288
3288
|
});
|
|
3289
3289
|
const svg = appendSvg(node, width, height || 0);
|
|
3290
|
-
const sizeScale = scaleLinear().domain([min(data,
|
|
3290
|
+
const sizeScale = scaleLinear().domain([min(data, _ref3 => {
|
|
3291
3291
|
let {
|
|
3292
3292
|
sizeValue
|
|
3293
3293
|
} = _ref3;
|
|
3294
3294
|
return sizeValue;
|
|
3295
|
-
}), max(data,
|
|
3295
|
+
}), max(data, _ref4 => {
|
|
3296
3296
|
let {
|
|
3297
3297
|
sizeValue
|
|
3298
3298
|
} = _ref4;
|
|
@@ -3325,12 +3325,12 @@ const draw$5 = (node, props) => {
|
|
|
3325
3325
|
width: yAxisWidth
|
|
3326
3326
|
} = computeDimensions(yAxis);
|
|
3327
3327
|
const range = [marginLeft + yAxisWidth + (yAxisPadding || 0) + yScaleLabelHeight, width - marginRight];
|
|
3328
|
-
const xScale = scaleLinear().domain([min(data,
|
|
3328
|
+
const xScale = scaleLinear().domain([min(data, _ref5 => {
|
|
3329
3329
|
let {
|
|
3330
3330
|
xValue
|
|
3331
3331
|
} = _ref5;
|
|
3332
3332
|
return xValue;
|
|
3333
|
-
}), max(data,
|
|
3333
|
+
}), max(data, _ref6 => {
|
|
3334
3334
|
let {
|
|
3335
3335
|
xValue
|
|
3336
3336
|
} = _ref6;
|
|
@@ -3357,32 +3357,32 @@ const draw$5 = (node, props) => {
|
|
|
3357
3357
|
drawGridX
|
|
3358
3358
|
});
|
|
3359
3359
|
xAxis.attr('transform', "translate(0, " + (yScale(yTicks[0]) + (xAxisPadding || 0)) + ")");
|
|
3360
|
-
const bubbles = svg.append('g').selectAll('dot').data(data).enter().append('circle').attr('class', bubbleChartClassNames.bubbleChartCircle).attr('cx',
|
|
3360
|
+
const bubbles = svg.append('g').selectAll('dot').data(data).enter().append('circle').attr('class', bubbleChartClassNames.bubbleChartCircle).attr('cx', _ref7 => {
|
|
3361
3361
|
let {
|
|
3362
3362
|
xValue
|
|
3363
3363
|
} = _ref7;
|
|
3364
3364
|
return xScale(xValue);
|
|
3365
|
-
}).attr('cy',
|
|
3365
|
+
}).attr('cy', _ref8 => {
|
|
3366
3366
|
let {
|
|
3367
3367
|
yValue
|
|
3368
3368
|
} = _ref8;
|
|
3369
3369
|
return yScale(yValue);
|
|
3370
|
-
}).attr('r',
|
|
3370
|
+
}).attr('r', _ref9 => {
|
|
3371
3371
|
let {
|
|
3372
3372
|
sizeValue
|
|
3373
3373
|
} = _ref9;
|
|
3374
3374
|
return sizeScale(sizeValue) / 2;
|
|
3375
|
-
}).attr('fill',
|
|
3375
|
+
}).attr('fill', _ref10 => {
|
|
3376
3376
|
let {
|
|
3377
3377
|
color
|
|
3378
3378
|
} = _ref10;
|
|
3379
3379
|
return color || 'rgba(0, 176, 113, 0.6)';
|
|
3380
|
-
}).attr('stroke',
|
|
3380
|
+
}).attr('stroke', _ref11 => {
|
|
3381
3381
|
let {
|
|
3382
3382
|
stroke
|
|
3383
3383
|
} = _ref11;
|
|
3384
3384
|
return stroke || 'transparent';
|
|
3385
|
-
}).attr('style',
|
|
3385
|
+
}).attr('style', _ref12 => {
|
|
3386
3386
|
let {
|
|
3387
3387
|
style
|
|
3388
3388
|
} = _ref12;
|