@fluentui/react-charting 5.23.91 → 5.23.93
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 +61 -1
- package/CHANGELOG.md +25 -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 +239 -94
- 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 +243 -95
- 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 +243 -95
- 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
|
@@ -69,15 +69,19 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
69
69
|
_this_1._xPadding = 0;
|
|
70
70
|
_this_1._yPaddingPrimary = 0;
|
|
71
71
|
_this_1._yPaddingSecondary = 0;
|
|
72
|
+
_this_1._hasMarkersMode = false;
|
|
72
73
|
_this_1.toImage = function (opts) {
|
|
73
74
|
var _a, _b;
|
|
74
75
|
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);
|
|
75
76
|
};
|
|
76
77
|
_this_1._getDomainNRangeValues = function (points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues, shiftX) {
|
|
77
78
|
var domainNRangeValue;
|
|
78
|
-
if (_this_1.
|
|
79
|
+
if (_this_1._hasMarkersMode && xAxisType === index_3.XAxisTypes.NumericAxis) {
|
|
79
80
|
domainNRangeValue = _this_1._getDomainNRangeValuesWithPadding(points, margins, width, isRTL);
|
|
80
81
|
}
|
|
82
|
+
else if (_this_1._hasMarkersMode && xAxisType === index_3.XAxisTypes.DateAxis) {
|
|
83
|
+
domainNRangeValue = _this_1._getDomainNRangeValuesOfDateWithPadding(points, margins, width, isRTL, tickValues, chartType, barWidth);
|
|
84
|
+
}
|
|
81
85
|
else if (xAxisType === index_3.XAxisTypes.NumericAxis) {
|
|
82
86
|
domainNRangeValue = (0, index_3.domainRangeOfNumericForAreaChart)(points, margins, width, isRTL);
|
|
83
87
|
}
|
|
@@ -90,8 +94,9 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
90
94
|
return domainNRangeValue;
|
|
91
95
|
};
|
|
92
96
|
_this_1._injectIndexPropertyInLineChartData = function (lineChartData, isFilterSelectedLegends) {
|
|
97
|
+
var _a;
|
|
93
98
|
if (isFilterSelectedLegends === void 0) { isFilterSelectedLegends = false; }
|
|
94
|
-
var
|
|
99
|
+
var _b = _this_1.props.allowMultipleShapesForPoints, allowMultipleShapesForPoints = _b === void 0 ? false : _b;
|
|
95
100
|
// Apply filter only if isPropChange is true
|
|
96
101
|
var filteredData = isFilterSelectedLegends
|
|
97
102
|
? lineChartData === null || lineChartData === void 0 ? void 0 : lineChartData.filter(function (item) {
|
|
@@ -100,6 +105,8 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
100
105
|
((_c = _this_1.props.legendProps) === null || _c === void 0 ? void 0 : _c.selectedLegend) === item.legend;
|
|
101
106
|
})
|
|
102
107
|
: lineChartData;
|
|
108
|
+
_this_1._hasMarkersMode =
|
|
109
|
+
(_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;
|
|
103
110
|
return filteredData
|
|
104
111
|
? filteredData.map(function (item, index) {
|
|
105
112
|
var _a, _b;
|
|
@@ -126,7 +133,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
126
133
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
127
134
|
var _a = (0, index_3.findNumericMinMaxOfY)(points, yAxisType, useSecondaryYScale), startValue = _a.startValue, endValue = _a.endValue;
|
|
128
135
|
var yPadding = 0;
|
|
129
|
-
if (_this_1.
|
|
136
|
+
if (_this_1._hasMarkersMode) {
|
|
130
137
|
yPadding = (endValue - startValue) * 0.1;
|
|
131
138
|
if (useSecondaryYScale) {
|
|
132
139
|
_this_1._yPaddingSecondary = yPadding;
|
|
@@ -586,6 +593,40 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
586
593
|
var yValue = point.yAxisCalloutData || point.y;
|
|
587
594
|
return ((_a = point.callOutAccessibilityData) === null || _a === void 0 ? void 0 : _a.ariaLabel) || "".concat(xValue, ". ").concat(legend, ", ").concat(yValue, ".");
|
|
588
595
|
};
|
|
596
|
+
_this_1._getDomainNRangeValuesOfDateWithPadding = function (points, margins, width, isRTL, tickValues, chartType, barWidth) {
|
|
597
|
+
if (tickValues === void 0) { tickValues = []; }
|
|
598
|
+
var sDate;
|
|
599
|
+
var lDate;
|
|
600
|
+
sDate = (0, d3_array_2.min)(points, function (point) {
|
|
601
|
+
return (0, d3_array_2.min)(point.data, function (item) { return item.x; });
|
|
602
|
+
});
|
|
603
|
+
lDate = (0, d3_array_2.max)(points, function (point) {
|
|
604
|
+
return (0, d3_array_2.max)(point.data, function (item) { return item.x; });
|
|
605
|
+
});
|
|
606
|
+
// Include tickValues if present
|
|
607
|
+
sDate = (0, d3_array_2.min)(tslib_1.__spreadArray(tslib_1.__spreadArray([], tickValues, true), [sDate], false));
|
|
608
|
+
lDate = (0, d3_array_2.max)(tslib_1.__spreadArray(tslib_1.__spreadArray([], tickValues, true), [lDate], false));
|
|
609
|
+
// Calculate time-based padding (e.g. 10% of the date range)
|
|
610
|
+
var dateRange = lDate.getTime() - sDate.getTime();
|
|
611
|
+
var datePadding = _this_1._hasMarkersMode ? dateRange * 0.1 : 0;
|
|
612
|
+
var paddedSDate = new Date(sDate.getTime() - datePadding);
|
|
613
|
+
var paddedLDate = new Date(lDate.getTime() + datePadding);
|
|
614
|
+
var rStartValue = margins.left;
|
|
615
|
+
var rEndValue = width - margins.right;
|
|
616
|
+
return isRTL
|
|
617
|
+
? {
|
|
618
|
+
dStartValue: paddedLDate,
|
|
619
|
+
dEndValue: paddedSDate,
|
|
620
|
+
rStartValue: rStartValue,
|
|
621
|
+
rEndValue: rEndValue,
|
|
622
|
+
}
|
|
623
|
+
: {
|
|
624
|
+
dStartValue: paddedSDate,
|
|
625
|
+
dEndValue: paddedLDate,
|
|
626
|
+
rStartValue: rStartValue,
|
|
627
|
+
rEndValue: rEndValue,
|
|
628
|
+
};
|
|
629
|
+
};
|
|
589
630
|
_this_1._getDomainNRangeValuesWithPadding = function (points, margins, width, isRTL) {
|
|
590
631
|
_this_1._xMin = (0, d3_array_2.min)(points, function (point) {
|
|
591
632
|
return (0, d3_array_2.min)(point.data, function (item) { return item.x; });
|
|
@@ -595,7 +636,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
595
636
|
return item.x;
|
|
596
637
|
});
|
|
597
638
|
});
|
|
598
|
-
if (_this_1.
|
|
639
|
+
if (_this_1._hasMarkersMode) {
|
|
599
640
|
_this_1._xPadding = (_this_1._xMax - _this_1._xMin) * 0.1;
|
|
600
641
|
}
|
|
601
642
|
var rStartValue = margins.left;
|
|
@@ -802,7 +843,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
802
843
|
};
|
|
803
844
|
LineChartBase.prototype._createLines = function (xElement, containerHeight) {
|
|
804
845
|
var _this_1 = this;
|
|
805
|
-
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;
|
|
846
|
+
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;
|
|
806
847
|
var lines = [];
|
|
807
848
|
if (this.state.isSelectedLegend) {
|
|
808
849
|
this._points = this.state.selectedLegendPoints;
|
|
@@ -826,9 +867,9 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
826
867
|
var verticaLineHeight = containerHeight - this_1.margins.bottom + 6;
|
|
827
868
|
var yScale = this_1._points[i].useSecondaryYScale && this_1._yScaleSecondary ? this_1._yScaleSecondary : this_1._yScalePrimary;
|
|
828
869
|
var yPadding = this_1._points[i].useSecondaryYScale && this_1._yScaleSecondary ? this_1._yPaddingSecondary : this_1._yPaddingPrimary;
|
|
829
|
-
var extraMaxPixels = this_1.
|
|
870
|
+
var extraMaxPixels = this_1._hasMarkersMode ? this_1._getRangeForScatterMarkerSize(yScale, yPadding) : 0;
|
|
830
871
|
if (this_1._points[i].data.length === 1) {
|
|
831
|
-
var
|
|
872
|
+
var _9 = this_1._points[i].data[0], x1_1 = _9.x, y1 = _9.y, xAxisCalloutData_1 = _9.xAxisCalloutData, xAxisCalloutAccessibilityData_1 = _9.xAxisCalloutAccessibilityData;
|
|
832
873
|
var circleId_1 = "".concat(this_1._circleId, "_").concat(i);
|
|
833
874
|
var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
|
|
834
875
|
var currentMarkerSize = this_1._points[i].data[0].markerSize;
|
|
@@ -887,48 +928,48 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
887
928
|
var lineId = "".concat(this_1._lineId, "_").concat(i, "_").concat(j);
|
|
888
929
|
var borderId = "".concat(this_1._borderId, "_").concat(i, "_").concat(j);
|
|
889
930
|
var circleId = "".concat(this_1._circleId, "_").concat(i, "_").concat(j);
|
|
890
|
-
var
|
|
891
|
-
var
|
|
931
|
+
var _10 = this_1._points[i].data[j - 1], x1 = _10.x, y1 = _10.y, xAxisCalloutData = _10.xAxisCalloutData, xAxisCalloutAccessibilityData = _10.xAxisCalloutAccessibilityData;
|
|
932
|
+
var _11 = this_1._points[i].data[j], x2 = _11.x, y2 = _11.y;
|
|
892
933
|
var path = this_1._getPath(this_1._xAxisScale(x1), yScale(y1), circleId, j, false, this_1._points[i].index);
|
|
893
934
|
var strokeWidth = ((_q = this_1._points[i].lineOptions) === null || _q === void 0 ? void 0 : _q.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
|
|
894
935
|
var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
|
|
895
936
|
var currentPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== circleId;
|
|
896
937
|
var currentMarkerSize = this_1._points[i].data[j - 1].markerSize;
|
|
897
|
-
pointsForLine.push(this_1.
|
|
938
|
+
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) }))));
|
|
898
939
|
if (j + 1 === this_1._points[i].data.length) {
|
|
899
940
|
// If this is last point of the line segment.
|
|
900
941
|
var lastCircleId_1 = "".concat(circleId).concat(j, "L");
|
|
901
942
|
var hiddenHoverCircleId = "".concat(circleId).concat(j, "D");
|
|
902
943
|
var lastPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== lastCircleId_1;
|
|
903
944
|
path = this_1._getPath(this_1._xAxisScale(x2), yScale(y2), lastCircleId_1, j, true, this_1._points[i].index);
|
|
904
|
-
var
|
|
945
|
+
var _12 = this_1._points[i].data[j], lastCirlceXCallout_1 = _12.xAxisCalloutData, lastCirlceXCalloutAccessibilityData_1 = _12.xAxisCalloutAccessibilityData;
|
|
905
946
|
currentMarkerSize = this_1._points[i].data[j].markerSize;
|
|
906
947
|
pointsForLine.push(React.createElement(React.Fragment, { key: "".concat(lastCircleId_1, "_container") },
|
|
907
|
-
this_1.
|
|
948
|
+
((_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 () {
|
|
908
949
|
return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
|
|
909
950
|
}, 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 () {
|
|
910
951
|
return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
|
|
911
952
|
}, 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) }))),
|
|
912
953
|
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 })));
|
|
913
954
|
}
|
|
914
|
-
if (this_1.
|
|
955
|
+
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'))) {
|
|
915
956
|
if (isLegendSelected) {
|
|
916
957
|
// don't draw line if it is in a gap
|
|
917
958
|
if (!isInGap) {
|
|
918
|
-
var lineBorderWidth = ((
|
|
959
|
+
var lineBorderWidth = ((_x = this_1._points[i].lineOptions) === null || _x === void 0 ? void 0 : _x.lineBorderWidth)
|
|
919
960
|
? Number.parseFloat(this_1._points[i].lineOptions.lineBorderWidth.toString())
|
|
920
961
|
: 0;
|
|
921
962
|
if (lineBorderWidth > 0) {
|
|
922
|
-
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: (
|
|
963
|
+
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 }));
|
|
923
964
|
}
|
|
924
965
|
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) {
|
|
925
966
|
_this_1._refCallback(e, lineId);
|
|
926
|
-
}, 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: (
|
|
967
|
+
}, 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))));
|
|
927
968
|
}
|
|
928
969
|
}
|
|
929
970
|
else {
|
|
930
971
|
if (!isInGap) {
|
|
931
|
-
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: (
|
|
972
|
+
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 }));
|
|
932
973
|
}
|
|
933
974
|
}
|
|
934
975
|
}
|