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