@fluentui/react-charting 5.23.91 → 5.23.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +40 -1
- package/CHANGELOG.md +15 -2
- package/dist/react-charting.d.ts +5 -1
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +2 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js +9 -2
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +4 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +213 -86
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.d.ts +2 -0
- package/lib/components/LineChart/LineChart.base.js +58 -17
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.types.d.ts +1 -1
- package/lib/components/LineChart/LineChart.types.js.map +1 -1
- package/lib/types/IDataPoint.d.ts +4 -0
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/utilities/image-export-utils.js +18 -1
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +9 -2
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +4 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +217 -87
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.d.ts +2 -0
- package/lib-amd/components/LineChart/LineChart.base.js +58 -17
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.types.d.ts +1 -1
- package/lib-amd/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-amd/types/IDataPoint.d.ts +4 -0
- package/lib-amd/types/IDataPoint.js.map +1 -1
- package/lib-amd/utilities/image-export-utils.js +18 -1
- package/lib-amd/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +9 -2
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +4 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +217 -87
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.d.ts +2 -0
- package/lib-commonjs/components/LineChart/LineChart.base.js +58 -17
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.d.ts +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-commonjs/types/IDataPoint.d.ts +4 -0
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.js +18 -1
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/package.json +2 -2
- package/src/components/LineChart/LineChart.types.ts +1 -1
|
@@ -57,15 +57,19 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
|
|
|
57
57
|
_this_1._xPadding = 0;
|
|
58
58
|
_this_1._yPaddingPrimary = 0;
|
|
59
59
|
_this_1._yPaddingSecondary = 0;
|
|
60
|
+
_this_1._hasMarkersMode = false;
|
|
60
61
|
_this_1.toImage = function (opts) {
|
|
61
62
|
var _a, _b;
|
|
62
63
|
return (0, image_export_utils_1.toImage)((_a = _this_1._cartesianChartRef.current) === null || _a === void 0 ? void 0 : _a.chartContainer, (_b = _this_1._legendsRef.current) === null || _b === void 0 ? void 0 : _b.toSVG, _this_1._isRTL, opts);
|
|
63
64
|
};
|
|
64
65
|
_this_1._getDomainNRangeValues = function (points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues, shiftX) {
|
|
65
66
|
var domainNRangeValue;
|
|
66
|
-
if (_this_1.
|
|
67
|
+
if (_this_1._hasMarkersMode && xAxisType === index_3.XAxisTypes.NumericAxis) {
|
|
67
68
|
domainNRangeValue = _this_1._getDomainNRangeValuesWithPadding(points, margins, width, isRTL);
|
|
68
69
|
}
|
|
70
|
+
else if (_this_1._hasMarkersMode && xAxisType === index_3.XAxisTypes.DateAxis) {
|
|
71
|
+
domainNRangeValue = _this_1._getDomainNRangeValuesOfDateWithPadding(points, margins, width, isRTL, tickValues, chartType, barWidth);
|
|
72
|
+
}
|
|
69
73
|
else if (xAxisType === index_3.XAxisTypes.NumericAxis) {
|
|
70
74
|
domainNRangeValue = (0, index_3.domainRangeOfNumericForAreaChart)(points, margins, width, isRTL);
|
|
71
75
|
}
|
|
@@ -78,8 +82,9 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
|
|
|
78
82
|
return domainNRangeValue;
|
|
79
83
|
};
|
|
80
84
|
_this_1._injectIndexPropertyInLineChartData = function (lineChartData, isFilterSelectedLegends) {
|
|
85
|
+
var _a;
|
|
81
86
|
if (isFilterSelectedLegends === void 0) { isFilterSelectedLegends = false; }
|
|
82
|
-
var
|
|
87
|
+
var _b = _this_1.props.allowMultipleShapesForPoints, allowMultipleShapesForPoints = _b === void 0 ? false : _b;
|
|
83
88
|
// Apply filter only if isPropChange is true
|
|
84
89
|
var filteredData = isFilterSelectedLegends
|
|
85
90
|
? lineChartData === null || lineChartData === void 0 ? void 0 : lineChartData.filter(function (item) {
|
|
@@ -88,6 +93,8 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
|
|
|
88
93
|
((_c = _this_1.props.legendProps) === null || _c === void 0 ? void 0 : _c.selectedLegend) === item.legend;
|
|
89
94
|
})
|
|
90
95
|
: lineChartData;
|
|
96
|
+
_this_1._hasMarkersMode =
|
|
97
|
+
(_a = filteredData === null || filteredData === void 0 ? void 0 : filteredData.some(function (item) { var _a, _b, _c; return (_c = (_b = (_a = item.lineOptions) === null || _a === void 0 ? void 0 : _a.mode) === null || _b === void 0 ? void 0 : _b.includes) === null || _c === void 0 ? void 0 : _c.call(_b, 'markers'); })) !== null && _a !== void 0 ? _a : false;
|
|
91
98
|
return filteredData
|
|
92
99
|
? filteredData.map(function (item, index) {
|
|
93
100
|
var _a, _b;
|
|
@@ -114,7 +121,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
|
|
|
114
121
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
115
122
|
var _a = (0, index_3.findNumericMinMaxOfY)(points, yAxisType, useSecondaryYScale), startValue = _a.startValue, endValue = _a.endValue;
|
|
116
123
|
var yPadding = 0;
|
|
117
|
-
if (_this_1.
|
|
124
|
+
if (_this_1._hasMarkersMode) {
|
|
118
125
|
yPadding = (endValue - startValue) * 0.1;
|
|
119
126
|
if (useSecondaryYScale) {
|
|
120
127
|
_this_1._yPaddingSecondary = yPadding;
|
|
@@ -574,6 +581,40 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
|
|
|
574
581
|
var yValue = point.yAxisCalloutData || point.y;
|
|
575
582
|
return ((_a = point.callOutAccessibilityData) === null || _a === void 0 ? void 0 : _a.ariaLabel) || "".concat(xValue, ". ").concat(legend, ", ").concat(yValue, ".");
|
|
576
583
|
};
|
|
584
|
+
_this_1._getDomainNRangeValuesOfDateWithPadding = function (points, margins, width, isRTL, tickValues, chartType, barWidth) {
|
|
585
|
+
if (tickValues === void 0) { tickValues = []; }
|
|
586
|
+
var sDate;
|
|
587
|
+
var lDate;
|
|
588
|
+
sDate = (0, d3_array_2.min)(points, function (point) {
|
|
589
|
+
return (0, d3_array_2.min)(point.data, function (item) { return item.x; });
|
|
590
|
+
});
|
|
591
|
+
lDate = (0, d3_array_2.max)(points, function (point) {
|
|
592
|
+
return (0, d3_array_2.max)(point.data, function (item) { return item.x; });
|
|
593
|
+
});
|
|
594
|
+
// Include tickValues if present
|
|
595
|
+
sDate = (0, d3_array_2.min)(tslib_1.__spreadArray(tslib_1.__spreadArray([], tickValues, true), [sDate], false));
|
|
596
|
+
lDate = (0, d3_array_2.max)(tslib_1.__spreadArray(tslib_1.__spreadArray([], tickValues, true), [lDate], false));
|
|
597
|
+
// Calculate time-based padding (e.g. 10% of the date range)
|
|
598
|
+
var dateRange = lDate.getTime() - sDate.getTime();
|
|
599
|
+
var datePadding = _this_1._hasMarkersMode ? dateRange * 0.1 : 0;
|
|
600
|
+
var paddedSDate = new Date(sDate.getTime() - datePadding);
|
|
601
|
+
var paddedLDate = new Date(lDate.getTime() + datePadding);
|
|
602
|
+
var rStartValue = margins.left;
|
|
603
|
+
var rEndValue = width - margins.right;
|
|
604
|
+
return isRTL
|
|
605
|
+
? {
|
|
606
|
+
dStartValue: paddedLDate,
|
|
607
|
+
dEndValue: paddedSDate,
|
|
608
|
+
rStartValue: rStartValue,
|
|
609
|
+
rEndValue: rEndValue,
|
|
610
|
+
}
|
|
611
|
+
: {
|
|
612
|
+
dStartValue: paddedSDate,
|
|
613
|
+
dEndValue: paddedLDate,
|
|
614
|
+
rStartValue: rStartValue,
|
|
615
|
+
rEndValue: rEndValue,
|
|
616
|
+
};
|
|
617
|
+
};
|
|
577
618
|
_this_1._getDomainNRangeValuesWithPadding = function (points, margins, width, isRTL) {
|
|
578
619
|
_this_1._xMin = (0, d3_array_2.min)(points, function (point) {
|
|
579
620
|
return (0, d3_array_2.min)(point.data, function (item) { return item.x; });
|
|
@@ -583,7 +624,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
|
|
|
583
624
|
return item.x;
|
|
584
625
|
});
|
|
585
626
|
});
|
|
586
|
-
if (_this_1.
|
|
627
|
+
if (_this_1._hasMarkersMode) {
|
|
587
628
|
_this_1._xPadding = (_this_1._xMax - _this_1._xMin) * 0.1;
|
|
588
629
|
}
|
|
589
630
|
var rStartValue = margins.left;
|
|
@@ -790,7 +831,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
|
|
|
790
831
|
};
|
|
791
832
|
LineChartBase.prototype._createLines = function (xElement, containerHeight) {
|
|
792
833
|
var _this_1 = this;
|
|
793
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
|
|
834
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
|
794
835
|
var lines = [];
|
|
795
836
|
if (this.state.isSelectedLegend) {
|
|
796
837
|
this._points = this.state.selectedLegendPoints;
|
|
@@ -814,9 +855,9 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
|
|
|
814
855
|
var verticaLineHeight = containerHeight - this_1.margins.bottom + 6;
|
|
815
856
|
var yScale = this_1._points[i].useSecondaryYScale && this_1._yScaleSecondary ? this_1._yScaleSecondary : this_1._yScalePrimary;
|
|
816
857
|
var yPadding = this_1._points[i].useSecondaryYScale && this_1._yScaleSecondary ? this_1._yPaddingSecondary : this_1._yPaddingPrimary;
|
|
817
|
-
var extraMaxPixels = this_1.
|
|
858
|
+
var extraMaxPixels = this_1._hasMarkersMode ? this_1._getRangeForScatterMarkerSize(yScale, yPadding) : 0;
|
|
818
859
|
if (this_1._points[i].data.length === 1) {
|
|
819
|
-
var
|
|
860
|
+
var _9 = this_1._points[i].data[0], x1_1 = _9.x, y1 = _9.y, xAxisCalloutData_1 = _9.xAxisCalloutData, xAxisCalloutAccessibilityData_1 = _9.xAxisCalloutAccessibilityData;
|
|
820
861
|
var circleId_1 = "".concat(this_1._circleId, "_").concat(i);
|
|
821
862
|
var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
|
|
822
863
|
var currentMarkerSize = this_1._points[i].data[0].markerSize;
|
|
@@ -875,48 +916,48 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
|
|
|
875
916
|
var lineId = "".concat(this_1._lineId, "_").concat(i, "_").concat(j);
|
|
876
917
|
var borderId = "".concat(this_1._borderId, "_").concat(i, "_").concat(j);
|
|
877
918
|
var circleId = "".concat(this_1._circleId, "_").concat(i, "_").concat(j);
|
|
878
|
-
var
|
|
879
|
-
var
|
|
919
|
+
var _10 = this_1._points[i].data[j - 1], x1 = _10.x, y1 = _10.y, xAxisCalloutData = _10.xAxisCalloutData, xAxisCalloutAccessibilityData = _10.xAxisCalloutAccessibilityData;
|
|
920
|
+
var _11 = this_1._points[i].data[j], x2 = _11.x, y2 = _11.y;
|
|
880
921
|
var path = this_1._getPath(this_1._xAxisScale(x1), yScale(y1), circleId, j, false, this_1._points[i].index);
|
|
881
922
|
var strokeWidth = ((_q = this_1._points[i].lineOptions) === null || _q === void 0 ? void 0 : _q.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
|
|
882
923
|
var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
|
|
883
924
|
var currentPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== circleId;
|
|
884
925
|
var currentMarkerSize = this_1._points[i].data[j - 1].markerSize;
|
|
885
|
-
pointsForLine.push(this_1.
|
|
926
|
+
pointsForLine.push(((_s = (_r = this_1._points[i].lineOptions) === null || _r === void 0 ? void 0 : _r.mode) === null || _s === void 0 ? void 0 : _s.includes('markers')) ? (React.createElement("circle", tslib_1.__assign({ id: circleId, key: circleId, r: currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, cx: this_1._xAxisScale(x1), cy: yScale(y1), "data-is-focusable": isLegendSelected, onMouseOver: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale), onMouseOut: this_1._handleMouseOut, onFocus: function () { return _this_1._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData); }, onBlur: this_1._handleMouseOut }, this_1._getClickHandler(this_1._points[i].data[j - 1].onDataPointClick), { opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01, fill: this_1._getPointFill(lineColor, circleId, j, false), stroke: lineColor, strokeWidth: strokeWidth, role: "img", "aria-label": this_1._getAriaLabel(i, j - 1) }))) : (React.createElement("path", tslib_1.__assign({ id: circleId, key: circleId, d: path, "data-is-focusable": isLegendSelected, onMouseOver: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale), onMouseOut: this_1._handleMouseOut, onFocus: function () { return _this_1._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData); }, onBlur: this_1._handleMouseOut }, this_1._getClickHandler(this_1._points[i].data[j - 1].onDataPointClick), { opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01, fill: this_1._getPointFill(lineColor, circleId, j, false), stroke: lineColor, strokeWidth: strokeWidth, role: "img", "aria-label": this_1._getAriaLabel(i, j - 1) }))));
|
|
886
927
|
if (j + 1 === this_1._points[i].data.length) {
|
|
887
928
|
// If this is last point of the line segment.
|
|
888
929
|
var lastCircleId_1 = "".concat(circleId).concat(j, "L");
|
|
889
930
|
var hiddenHoverCircleId = "".concat(circleId).concat(j, "D");
|
|
890
931
|
var lastPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== lastCircleId_1;
|
|
891
932
|
path = this_1._getPath(this_1._xAxisScale(x2), yScale(y2), lastCircleId_1, j, true, this_1._points[i].index);
|
|
892
|
-
var
|
|
933
|
+
var _12 = this_1._points[i].data[j], lastCirlceXCallout_1 = _12.xAxisCalloutData, lastCirlceXCalloutAccessibilityData_1 = _12.xAxisCalloutAccessibilityData;
|
|
893
934
|
currentMarkerSize = this_1._points[i].data[j].markerSize;
|
|
894
935
|
pointsForLine.push(React.createElement(React.Fragment, { key: "".concat(lastCircleId_1, "_container") },
|
|
895
|
-
this_1.
|
|
936
|
+
((_u = (_t = this_1._points[i].lineOptions) === null || _t === void 0 ? void 0 : _t.mode) === null || _u === void 0 ? void 0 : _u.includes('markers')) ? (React.createElement("circle", tslib_1.__assign({ id: lastCircleId_1, key: lastCircleId_1, r: currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, cx: this_1._xAxisScale(x2), cy: yScale(y2), "data-is-focusable": isLegendSelected, onMouseOver: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale), onMouseMove: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale), onMouseOut: this_1._handleMouseOut, onFocus: function () {
|
|
896
937
|
return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
|
|
897
938
|
}, onBlur: this_1._handleMouseOut }, this_1._getClickHandler(this_1._points[i].data[j].onDataPointClick), { opacity: isLegendSelected && !lastPointHidden ? 1 : 0.01, fill: this_1._getPointFill(lineColor, lastCircleId_1, j, true), stroke: lineColor, strokeWidth: strokeWidth, role: "img", "aria-label": this_1._getAriaLabel(i, j) }))) : (React.createElement("path", tslib_1.__assign({ id: lastCircleId_1, key: lastCircleId_1, d: path, "data-is-focusable": isLegendSelected, onMouseOver: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale), onMouseMove: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale), onMouseOut: this_1._handleMouseOut, onFocus: function () {
|
|
898
939
|
return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
|
|
899
940
|
}, onBlur: this_1._handleMouseOut }, this_1._getClickHandler(this_1._points[i].data[j].onDataPointClick), { opacity: isLegendSelected && !lastPointHidden ? 1 : 0.01, fill: this_1._getPointFill(lineColor, lastCircleId_1, j, true), stroke: lineColor, strokeWidth: strokeWidth, role: "img", "aria-label": this_1._getAriaLabel(i, j) }))),
|
|
900
941
|
React.createElement("circle", { id: hiddenHoverCircleId, key: hiddenHoverCircleId, r: 8, cx: this_1._xAxisScale(x2), cy: yScale(y2), opacity: 0, width: 0, onMouseOver: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale), onMouseMove: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale), onMouseOut: this_1._handleMouseOut, strokeWidth: 0, focusable: false, onBlur: this_1._handleMouseOut })));
|
|
901
942
|
}
|
|
902
|
-
if (this_1.
|
|
943
|
+
if (!this_1._hasMarkersMode || ((_w = (_v = this_1._points[i].lineOptions) === null || _v === void 0 ? void 0 : _v.mode) === null || _w === void 0 ? void 0 : _w.includes('lines'))) {
|
|
903
944
|
if (isLegendSelected) {
|
|
904
945
|
// don't draw line if it is in a gap
|
|
905
946
|
if (!isInGap) {
|
|
906
|
-
var lineBorderWidth = ((
|
|
947
|
+
var lineBorderWidth = ((_x = this_1._points[i].lineOptions) === null || _x === void 0 ? void 0 : _x.lineBorderWidth)
|
|
907
948
|
? Number.parseFloat(this_1._points[i].lineOptions.lineBorderWidth.toString())
|
|
908
949
|
: 0;
|
|
909
950
|
if (lineBorderWidth > 0) {
|
|
910
|
-
bordersForLine.push(React.createElement("line", { id: borderId, key: borderId, x1: this_1._xAxisScale(x1), y1: yScale(y1), x2: this_1._xAxisScale(x2), y2: yScale(y2), strokeLinecap: (
|
|
951
|
+
bordersForLine.push(React.createElement("line", { id: borderId, key: borderId, x1: this_1._xAxisScale(x1), y1: yScale(y1), x2: this_1._xAxisScale(x2), y2: yScale(y2), strokeLinecap: (_z = (_y = this_1._points[i].lineOptions) === null || _y === void 0 ? void 0 : _y.strokeLinecap) !== null && _z !== void 0 ? _z : 'round', strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth, stroke: ((_0 = this_1._points[i].lineOptions) === null || _0 === void 0 ? void 0 : _0.lineBorderColor) || theme.semanticColors.bodyBackground, opacity: 1 }));
|
|
911
952
|
}
|
|
912
953
|
linesForLine.push(React.createElement("line", tslib_1.__assign({ id: lineId, key: lineId, x1: this_1._xAxisScale(x1), y1: yScale(y1), x2: this_1._xAxisScale(x2), y2: yScale(y2), strokeWidth: strokeWidth, ref: function (e) {
|
|
913
954
|
_this_1._refCallback(e, lineId);
|
|
914
|
-
}, onMouseOver: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale), onMouseOut: this_1._handleMouseOut, stroke: lineColor, strokeLinecap: (
|
|
955
|
+
}, onMouseOver: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale), onMouseOut: this_1._handleMouseOut, stroke: lineColor, strokeLinecap: (_2 = (_1 = this_1._points[i].lineOptions) === null || _1 === void 0 ? void 0 : _1.strokeLinecap) !== null && _2 !== void 0 ? _2 : 'round', strokeDasharray: (_3 = this_1._points[i].lineOptions) === null || _3 === void 0 ? void 0 : _3.strokeDasharray, strokeDashoffset: (_4 = this_1._points[i].lineOptions) === null || _4 === void 0 ? void 0 : _4.strokeDashoffset, opacity: 1 }, this_1._getClickHandler(this_1._points[i].onLineClick))));
|
|
915
956
|
}
|
|
916
957
|
}
|
|
917
958
|
else {
|
|
918
959
|
if (!isInGap) {
|
|
919
|
-
linesForLine.push(React.createElement("line", { id: lineId, key: lineId, x1: this_1._xAxisScale(x1), y1: yScale(y1), x2: this_1._xAxisScale(x2), y2: yScale(y2), strokeWidth: strokeWidth, stroke: lineColor, strokeLinecap: (
|
|
960
|
+
linesForLine.push(React.createElement("line", { id: lineId, key: lineId, x1: this_1._xAxisScale(x1), y1: yScale(y1), x2: this_1._xAxisScale(x2), y2: yScale(y2), strokeWidth: strokeWidth, stroke: lineColor, strokeLinecap: (_6 = (_5 = this_1._points[i].lineOptions) === null || _5 === void 0 ? void 0 : _5.strokeLinecap) !== null && _6 !== void 0 ? _6 : 'round', strokeDasharray: (_7 = this_1._points[i].lineOptions) === null || _7 === void 0 ? void 0 : _7.strokeDasharray, strokeDashoffset: (_8 = this_1._points[i].lineOptions) === null || _8 === void 0 ? void 0 : _8.strokeDashoffset, opacity: 0.1 }));
|
|
920
961
|
}
|
|
921
962
|
}
|
|
922
963
|
}
|