@fluentui/react-charting 5.24.20 → 5.24.22

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.
Files changed (84) hide show
  1. package/CHANGELOG.json +61 -1
  2. package/CHANGELOG.md +25 -2
  3. package/bundle-size/ScatterChart.fixture.js +7 -0
  4. package/dist/react-charting.d.ts +27 -2
  5. package/dist/react-charting.js +1 -1
  6. package/dist/react-charting.min.js +1 -1
  7. package/etc/react-charting.api.md +8 -2
  8. package/lib/components/AreaChart/AreaChart.base.js +3 -3
  9. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  10. package/lib/components/CommonComponents/CartesianChart.base.js +4 -4
  11. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  12. package/lib/components/CommonComponents/CartesianChart.types.d.ts +18 -3
  13. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  14. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +10 -0
  15. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +187 -11
  16. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  17. package/lib/components/LineChart/LineChart.base.d.ts +0 -9
  18. package/lib/components/LineChart/LineChart.base.js +82 -138
  19. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  20. package/lib/components/ScatterChart/ScatterChart.base.js +37 -62
  21. package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
  22. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +2 -2
  23. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  24. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -2
  25. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  26. package/lib/index.d.ts +1 -1
  27. package/lib/index.js.map +1 -1
  28. package/lib/types/IDataPoint.d.ts +9 -0
  29. package/lib/types/IDataPoint.js.map +1 -1
  30. package/lib/utilities/utilities.d.ts +29 -28
  31. package/lib/utilities/utilities.js +127 -110
  32. package/lib/utilities/utilities.js.map +1 -1
  33. package/lib-amd/components/AreaChart/AreaChart.base.js +2 -2
  34. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  35. package/lib-amd/components/CommonComponents/CartesianChart.base.js +4 -4
  36. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  37. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +18 -3
  38. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  39. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +10 -0
  40. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +188 -11
  41. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  42. package/lib-amd/components/LineChart/LineChart.base.d.ts +0 -9
  43. package/lib-amd/components/LineChart/LineChart.base.js +80 -136
  44. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  45. package/lib-amd/components/ScatterChart/ScatterChart.base.js +35 -60
  46. package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
  47. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +1 -1
  48. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  49. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
  50. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  51. package/lib-amd/index.d.ts +1 -1
  52. package/lib-amd/index.js.map +1 -1
  53. package/lib-amd/types/IDataPoint.d.ts +9 -0
  54. package/lib-amd/types/IDataPoint.js.map +1 -1
  55. package/lib-amd/utilities/utilities.d.ts +29 -28
  56. package/lib-amd/utilities/utilities.js +133 -113
  57. package/lib-amd/utilities/utilities.js.map +1 -1
  58. package/lib-commonjs/components/AreaChart/AreaChart.base.js +2 -2
  59. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  60. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +4 -4
  61. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  62. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +18 -3
  63. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  64. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +10 -0
  65. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +188 -11
  66. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  67. package/lib-commonjs/components/LineChart/LineChart.base.d.ts +0 -9
  68. package/lib-commonjs/components/LineChart/LineChart.base.js +80 -136
  69. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  70. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +35 -60
  71. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
  72. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +1 -1
  73. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  74. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
  75. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  76. package/lib-commonjs/index.d.ts +1 -1
  77. package/lib-commonjs/index.js.map +1 -1
  78. package/lib-commonjs/types/IDataPoint.d.ts +9 -0
  79. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  80. package/lib-commonjs/utilities/utilities.d.ts +29 -28
  81. package/lib-commonjs/utilities/utilities.js +134 -114
  82. package/lib-commonjs/utilities/utilities.js.map +1 -1
  83. package/package.json +4 -4
  84. package/src/components/CommonComponents/CartesianChart.types.ts +22 -2
@@ -44,12 +44,7 @@ export declare class LineChartBase extends React.Component<ILineChartProps, ILin
44
44
  private _isRTL;
45
45
  private _cartesianChartRef;
46
46
  private _legendsRef;
47
- private _xMin;
48
- private _xMax;
49
- private _xPadding;
50
- private _yPaddingPrimary;
51
47
  private _yScaleSecondary;
52
- private _yPaddingSecondary;
53
48
  private _hasMarkersMode;
54
49
  private _isXAxisDateType;
55
50
  private _isScatterPolar;
@@ -71,7 +66,6 @@ export declare class LineChartBase extends React.Component<ILineChartProps, ILin
71
66
  private _getBoxWidthOfShape;
72
67
  private _getPath;
73
68
  private _getPointFill;
74
- private _getRangeForScatterMarkerSize;
75
69
  private _createLines;
76
70
  private _createColorFillBars;
77
71
  private _getStripePattern;
@@ -104,10 +98,7 @@ export declare class LineChartBase extends React.Component<ILineChartProps, ILin
104
98
  private _noLegendHighlighted;
105
99
  private _getColorFillBarOpacity;
106
100
  private _getAriaLabel;
107
- private _getDomainNRangeValuesOfDateWithPadding;
108
- private _getDomainNRangeValuesWithPadding;
109
101
  private _isChartEmpty;
110
102
  private _getChartTitle;
111
- private _setXMinMaxValues;
112
103
  }
113
104
  export {};
@@ -52,11 +52,6 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
52
52
  _this_1._yScalePrimary = '';
53
53
  _this_1.eventLabelHeight = 36;
54
54
  _this_1._isRTL = (0, Utilities_1.getRTL)();
55
- _this_1._xMin = Number.NEGATIVE_INFINITY;
56
- _this_1._xMax = Number.POSITIVE_INFINITY;
57
- _this_1._xPadding = 0;
58
- _this_1._yPaddingPrimary = 0;
59
- _this_1._yPaddingSecondary = 0;
60
55
  _this_1._hasMarkersMode = false;
61
56
  _this_1._isXAxisDateType = false;
62
57
  _this_1._isScatterPolar = false;
@@ -66,17 +61,11 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
66
61
  };
67
62
  _this_1._getDomainNRangeValues = function (points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues, shiftX) {
68
63
  var domainNRangeValue;
69
- if (_this_1._hasMarkersMode && xAxisType === index_3.XAxisTypes.NumericAxis) {
70
- domainNRangeValue = _this_1._getDomainNRangeValuesWithPadding(points, margins, width, isRTL);
71
- }
72
- else if (_this_1._hasMarkersMode && xAxisType === index_3.XAxisTypes.DateAxis) {
73
- domainNRangeValue = _this_1._getDomainNRangeValuesOfDateWithPadding(points, margins, width, isRTL, tickValues, chartType, barWidth);
74
- }
75
- else if (xAxisType === index_3.XAxisTypes.NumericAxis) {
76
- domainNRangeValue = (0, index_3.domainRangeOfNumericForAreaChart)(points, margins, width, isRTL);
64
+ if (xAxisType === index_3.XAxisTypes.NumericAxis) {
65
+ domainNRangeValue = (0, index_3.domainRangeOfNumericForAreaLineScatterCharts)(points, margins, width, isRTL, _this_1.props.xScaleType, _this_1._hasMarkersMode);
77
66
  }
78
67
  else if (xAxisType === index_3.XAxisTypes.DateAxis) {
79
- domainNRangeValue = (0, index_3.domainRangeOfDateForAreaLineVerticalBarChart)(points, margins, width, isRTL, tickValues, chartType, barWidth);
68
+ domainNRangeValue = (0, index_3.domainRangeOfDateForAreaLineScatterVerticalBarCharts)(points, margins, width, isRTL, tickValues, chartType, barWidth, _this_1._hasMarkersMode);
80
69
  }
81
70
  else {
82
71
  domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };
@@ -122,20 +111,14 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
122
111
  };
123
112
  _this_1._getNumericMinMaxOfY = function (points, yAxisType, useSecondaryYScale) {
124
113
  // eslint-disable-next-line @typescript-eslint/no-shadow
125
- var _a = (0, index_3.findNumericMinMaxOfY)(points, yAxisType, useSecondaryYScale), startValue = _a.startValue, endValue = _a.endValue;
126
- var yPadding = 0;
114
+ var _a = (0, index_3.findNumericMinMaxOfY)(points, yAxisType, useSecondaryYScale, useSecondaryYScale ? _this_1.props.secondaryYScaleType : _this_1.props.yScaleType), startValue = _a.startValue, endValue = _a.endValue;
115
+ var yPadding = { start: 0, end: 0 };
127
116
  if (_this_1._hasMarkersMode) {
128
- yPadding = (endValue - startValue) * 0.1;
129
- if (useSecondaryYScale) {
130
- _this_1._yPaddingSecondary = yPadding;
131
- }
132
- else {
133
- _this_1._yPaddingPrimary = yPadding;
134
- }
117
+ yPadding = (0, index_3.getDomainPaddingForMarkers)(startValue, endValue, useSecondaryYScale ? _this_1.props.secondaryYScaleType : _this_1.props.yScaleType);
135
118
  }
136
119
  return {
137
- startValue: startValue - yPadding,
138
- endValue: endValue + yPadding,
120
+ startValue: startValue - yPadding.start,
121
+ endValue: endValue + yPadding.end,
139
122
  };
140
123
  };
141
124
  _this_1._getMargins = function (margins) {
@@ -601,71 +584,10 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
601
584
  var yValue = point.yAxisCalloutData || point.y;
602
585
  return ((_a = point.callOutAccessibilityData) === null || _a === void 0 ? void 0 : _a.ariaLabel) || "".concat(xValue, ". ").concat(legend, ", ").concat(yValue, ".");
603
586
  };
604
- _this_1._getDomainNRangeValuesOfDateWithPadding = function (points, margins, width, isRTL, tickValues, chartType, barWidth) {
605
- if (tickValues === void 0) { tickValues = []; }
606
- _this_1._setXMinMaxValues(points);
607
- // Include tickValues if present
608
- var sDate = tickValues && tickValues.length > 0
609
- ? (0, d3_array_2.min)(tslib_1.__spreadArray(tslib_1.__spreadArray([], tickValues, true), [new Date(_this_1._xMin)], false))
610
- : new Date(_this_1._xMin);
611
- var lDate = tickValues && tickValues.length > 0
612
- ? (0, d3_array_2.max)(tslib_1.__spreadArray(tslib_1.__spreadArray([], tickValues, true), [new Date(_this_1._xMax)], false))
613
- : new Date(_this_1._xMax);
614
- // Calculate time-based padding (e.g. 10% of the date range)
615
- var dateRange = lDate.getTime() - sDate.getTime();
616
- var datePadding = _this_1._hasMarkersMode ? dateRange * 0.1 : 0;
617
- var paddedSDate = new Date(sDate.getTime() - datePadding);
618
- var paddedLDate = new Date(lDate.getTime() + datePadding);
619
- var rStartValue = margins.left;
620
- var rEndValue = width - margins.right;
621
- return isRTL
622
- ? {
623
- dStartValue: paddedLDate,
624
- dEndValue: paddedSDate,
625
- rStartValue: rStartValue,
626
- rEndValue: rEndValue,
627
- }
628
- : {
629
- dStartValue: paddedSDate,
630
- dEndValue: paddedLDate,
631
- rStartValue: rStartValue,
632
- rEndValue: rEndValue,
633
- };
634
- };
635
- _this_1._getDomainNRangeValuesWithPadding = function (points, margins, width, isRTL) {
636
- _this_1._setXMinMaxValues(points);
637
- if (_this_1._hasMarkersMode) {
638
- _this_1._xPadding = (_this_1._xMax - _this_1._xMin) * 0.1;
639
- }
640
- var rStartValue = margins.left;
641
- var rEndValue = width - margins.right;
642
- return isRTL
643
- ? {
644
- dStartValue: _this_1._xMax + _this_1._xPadding,
645
- dEndValue: _this_1._xMin - _this_1._xPadding,
646
- rStartValue: rStartValue,
647
- rEndValue: rEndValue,
648
- }
649
- : {
650
- dStartValue: _this_1._xMin - _this_1._xPadding,
651
- dEndValue: _this_1._xMax + _this_1._xPadding,
652
- rStartValue: rStartValue,
653
- rEndValue: rEndValue,
654
- };
655
- };
656
587
  _this_1._getChartTitle = function () {
657
588
  var _a = _this_1.props.data, chartTitle = _a.chartTitle, lineChartData = _a.lineChartData;
658
589
  return (chartTitle ? "".concat(chartTitle, ". ") : '') + "Line chart with ".concat((lineChartData === null || lineChartData === void 0 ? void 0 : lineChartData.length) || 0, " lines. ");
659
590
  };
660
- _this_1._setXMinMaxValues = function (points) {
661
- var getX = function (item) { return (_this_1._isXAxisDateType ? item.x : item.x); };
662
- var minVal = (0, d3_array_2.min)(points, function (point) { return (0, d3_array_2.min)(point.data, getX); });
663
- var maxVal = (0, d3_array_2.max)(points, function (point) { return (0, d3_array_2.max)(point.data, getX); });
664
- _this_1._xMin = _this_1._isXAxisDateType ? minVal.getTime() : minVal;
665
- _this_1._xMax = _this_1._isXAxisDateType ? maxVal.getTime() : maxVal;
666
- _this_1._xMin = _this_1._xMin === Number.NEGATIVE_INFINITY || !_this_1._xMin ? 0 : _this_1._xMin;
667
- _this_1._xMax = _this_1._xMax === Number.POSITIVE_INFINITY || !_this_1._xMax ? 0 : _this_1._xMax;
668
- };
669
591
  (0, Utilities_1.initializeComponentRef)(_this_1);
670
592
  _this_1.state = {
671
593
  hoverXValue: '',
@@ -844,14 +766,6 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
844
766
  : [];
845
767
  return (React.createElement(index_1.Legends, tslib_1.__assign({ legends: tslib_1.__spreadArray(tslib_1.__spreadArray([], legendDataItems, true), colorFillBarsLegendDataItems, true), enabledWrapLines: this.props.enabledLegendsWrapLines, overflowProps: this.props.legendsOverflowProps, focusZonePropsInHoverCard: this.props.focusZonePropsForLegendsInHoverCard, overflowText: this.props.legendsOverflowText }, (isLegendMultiSelectEnabled && { onLegendHoverCardLeave: this._onHoverCardHide }), this.props.legendProps, { ref: this._legendsRef })));
846
768
  };
847
- LineChartBase.prototype._getRangeForScatterMarkerSize = function (yScale, yPadding) {
848
- var extraXPixels = this._isRTL
849
- ? this._xAxisScale(this._xMax - this._xPadding) - this._xAxisScale(this._xMax)
850
- : this._xAxisScale(this._xMin + this._xPadding) - this._xAxisScale(this._xMin);
851
- var yMin = yScale.domain()[0];
852
- var extraYPixels = yScale(yMin) - yScale(yMin + yPadding);
853
- return Math.min(extraXPixels, extraYPixels);
854
- };
855
769
  // eslint-disable-next-line @typescript-eslint/no-deprecated
856
770
  LineChartBase.prototype._createLines = function (xElement, containerHeight) {
857
771
  var _this_1 = this;
@@ -884,27 +798,44 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
884
798
  var activePoint = this_1.state.activePoint;
885
799
  var theme = this_1.props.theme;
886
800
  var verticaLineHeight = containerHeight - this_1.margins.bottom + 6;
887
- var yScale = this_1._points[i].useSecondaryYScale && this_1._yScaleSecondary ? this_1._yScaleSecondary : this_1._yScalePrimary;
888
- var yPadding = this_1._points[i].useSecondaryYScale && this_1._yScaleSecondary ? this_1._yPaddingSecondary : this_1._yPaddingPrimary;
889
- var extraMaxPixels = this_1._hasMarkersMode ? this_1._getRangeForScatterMarkerSize(yScale, yPadding) : 0;
801
+ var useSecondaryYScale = !!(this_1._points[i].useSecondaryYScale && this_1._yScaleSecondary);
802
+ var yScale = useSecondaryYScale ? this_1._yScaleSecondary : this_1._yScalePrimary;
803
+ var extraMaxPixels = this_1._hasMarkersMode
804
+ ? (0, index_3.getRangeForScatterMarkerSize)({
805
+ data: this_1._points,
806
+ xScale: this_1._xAxisScale,
807
+ yScalePrimary: this_1._yScalePrimary,
808
+ yScaleSecondary: this_1._yScaleSecondary,
809
+ useSecondaryYScale: useSecondaryYScale,
810
+ xScaleType: this_1.props.xScaleType,
811
+ yScaleType: this_1.props.yScaleType,
812
+ secondaryYScaleType: this_1.props.secondaryYScaleType,
813
+ })
814
+ : 0;
890
815
  if (this_1._points[i].data.length === 1) {
891
816
  var _18 = this_1._points[i].data[0], x1_1 = _18.x, y1 = _18.y, xAxisCalloutData_1 = _18.xAxisCalloutData, xAxisCalloutAccessibilityData_1 = _18.xAxisCalloutAccessibilityData;
892
- var circleId_1 = "".concat(this_1._circleId, "_").concat(i);
893
- var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
894
- var currentMarkerSize = this_1._points[i].data[0].markerSize;
895
- var supportsTextMode = (_b = (_a = this_1._points[i].lineOptions) === null || _a === void 0 ? void 0 : _a.mode) === null || _b === void 0 ? void 0 : _b.includes('text');
896
- var text = this_1._points[i].data[0].text;
897
- pointsForLine.push(React.createElement(React.Fragment, { key: "".concat(circleId_1, "_fragment") },
898
- React.createElement("circle", tslib_1.__assign({ id: circleId_1, key: circleId_1, r: currentMarkerSize
899
- ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize
900
- : activePoint === circleId_1
901
- ? 5.5
902
- : 3.5, cx: this_1._xAxisScale(x1_1), cy: yScale(y1), fill: activePoint === circleId_1 ? theme.semanticColors.bodyBackground : lineColor, opacity: isLegendSelected ? 1 : 0.1, onMouseOver: this_1._handleHover.bind(this_1, x1_1, y1, verticaLineHeight, xAxisCalloutData_1, circleId_1, xAxisCalloutAccessibilityData_1, yScale, legendVal, lineColor), onMouseMove: this_1._handleHover.bind(this_1, x1_1, y1, verticaLineHeight, xAxisCalloutData_1, circleId_1, xAxisCalloutAccessibilityData_1, yScale, legendVal, lineColor), onMouseOut: this_1._handleMouseOut, strokeWidth: activePoint === circleId_1 ? DEFAULT_LINE_STROKE_SIZE : 0, stroke: activePoint === circleId_1 ? lineColor : '', role: "img", "aria-label": this_1._getAriaLabel(i, 0), "data-is-focusable": isLegendSelected, ref: function (e) {
903
- _this_1._refCallback(e, circleId_1);
904
- }, onFocus: function () { return _this_1._handleFocus(circleId_1, x1_1, xAxisCalloutData_1, circleId_1, xAxisCalloutAccessibilityData_1); }, onBlur: this_1._handleMouseOut }, this_1._getClickHandler(this_1._points[i].data[0].onDataPointClick))),
905
- !this_1._isScatterPolar && supportsTextMode && text && (React.createElement("text", { key: "".concat(circleId_1, "-label"), x: this_1._xAxisScale(x1_1), y: yScale(y1) +
906
- Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 3.5, 4) +
907
- 12, className: classNames.markerLabel, opacity: isLegendSelected ? 1 : 0.1 }, text))));
817
+ var xPoint = this_1._xAxisScale(x1_1);
818
+ var yPoint = yScale(y1);
819
+ if ((0, index_3.isPlottable)(xPoint, yPoint)) {
820
+ var circleId_1 = "".concat(this_1._circleId, "_").concat(i);
821
+ var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
822
+ var currentMarkerSize = this_1._points[i].data[0].markerSize;
823
+ var supportsTextMode = (_b = (_a = this_1._points[i].lineOptions) === null || _a === void 0 ? void 0 : _a.mode) === null || _b === void 0 ? void 0 : _b.includes('text');
824
+ var text = this_1._points[i].data[0].text;
825
+ pointsForLine.push(React.createElement(React.Fragment, { key: "".concat(circleId_1, "_fragment") },
826
+ React.createElement("circle", tslib_1.__assign({ id: circleId_1, key: circleId_1, r: currentMarkerSize
827
+ ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize
828
+ : activePoint === circleId_1
829
+ ? 5.5
830
+ : 3.5, cx: xPoint, cy: yPoint, fill: activePoint === circleId_1 ? theme.semanticColors.bodyBackground : lineColor, opacity: isLegendSelected ? 1 : 0.1, onMouseOver: this_1._handleHover.bind(this_1, x1_1, y1, verticaLineHeight, xAxisCalloutData_1, circleId_1, xAxisCalloutAccessibilityData_1, yScale, legendVal, lineColor), onMouseMove: this_1._handleHover.bind(this_1, x1_1, y1, verticaLineHeight, xAxisCalloutData_1, circleId_1, xAxisCalloutAccessibilityData_1, yScale, legendVal, lineColor), onMouseOut: this_1._handleMouseOut, strokeWidth: activePoint === circleId_1 ? DEFAULT_LINE_STROKE_SIZE : 0, stroke: activePoint === circleId_1 ? lineColor : '', role: "img", "aria-label": this_1._getAriaLabel(i, 0), "data-is-focusable": isLegendSelected, ref: function (e) {
831
+ _this_1._refCallback(e, circleId_1);
832
+ }, onFocus: function () {
833
+ return _this_1._handleFocus(circleId_1, x1_1, xAxisCalloutData_1, circleId_1, xAxisCalloutAccessibilityData_1);
834
+ }, onBlur: this_1._handleMouseOut }, this_1._getClickHandler(this_1._points[i].data[0].onDataPointClick))),
835
+ !this_1._isScatterPolar && supportsTextMode && text && (React.createElement("text", { key: "".concat(circleId_1, "-label"), x: xPoint, y: yPoint +
836
+ Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 3.5, 4) +
837
+ 12, className: classNames.markerLabel, opacity: isLegendSelected ? 1 : 0.1 }, text))));
838
+ }
908
839
  }
909
840
  var gapIndex = 0;
910
841
  var gaps = (_d = (_c = this_1._points[i].gaps) === null || _c === void 0 ? void 0 : _c.sort(function (a, b) { return a.startIndex - b.startIndex; })) !== null && _d !== void 0 ? _d : [];
@@ -916,7 +847,8 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
916
847
  .x(function (d) { return _this_1._xAxisScale(d[0]); })
917
848
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
918
849
  .y(function (d) { return yScale(d[1]); })
919
- .curve((0, index_3.getCurveFactory)(lineCurve));
850
+ .curve((0, index_3.getCurveFactory)(lineCurve))
851
+ .defined(function (d) { return (0, index_3.isPlottable)(_this_1._xAxisScale(d[0]), yScale(d[1])); });
920
852
  var lineId = "".concat(this_1._lineId, "_").concat(i);
921
853
  var borderId = "".concat(this_1._borderId, "_").concat(i);
922
854
  var strokeWidth = ((_f = this_1._points[i].lineOptions) === null || _f === void 0 ? void 0 : _f.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
@@ -955,43 +887,55 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
955
887
  var circleId = "".concat(this_1._circleId, "_").concat(i, "_").concat(j);
956
888
  var _19 = this_1._points[i].data[j - 1], x1 = _19.x, y1 = _19.y, xAxisCalloutData = _19.xAxisCalloutData, xAxisCalloutAccessibilityData = _19.xAxisCalloutAccessibilityData;
957
889
  var _20 = this_1._points[i].data[j], x2 = _20.x, y2 = _20.y;
958
- var path = this_1._getPath(this_1._xAxisScale(x1), yScale(y1), circleId, j, false, this_1._points[i].index);
890
+ var xPoint1 = this_1._xAxisScale(x1);
891
+ var yPoint1 = yScale(y1);
892
+ var xPoint2 = this_1._xAxisScale(x2);
893
+ var yPoint2 = yScale(y2);
959
894
  var strokeWidth = ((_s = this_1._points[i].lineOptions) === null || _s === void 0 ? void 0 : _s.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
960
895
  var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
961
896
  var currentPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== circleId;
962
897
  var supportsTextMode = (_u = (_t = this_1._points[i].lineOptions) === null || _t === void 0 ? void 0 : _t.mode) === null || _u === void 0 ? void 0 : _u.includes('text');
963
898
  var text = this_1._points[i].data[j - 1].text;
964
899
  var currentMarkerSize = this_1._points[i].data[j - 1].markerSize;
965
- pointsForLine.push(((_w = (_v = this_1._points[i].lineOptions) === null || _v === void 0 ? void 0 : _v.mode) === null || _w === void 0 ? void 0 : _w.includes('markers')) || supportsTextMode ? (React.createElement(React.Fragment, null,
966
- 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, legendVal, lineColor), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale, legendVal, lineColor), onMouseOut: this_1._handleMouseOut, onFocus: function () {
900
+ if ((0, index_3.isPlottable)(xPoint1, yPoint1)) {
901
+ var path = this_1._getPath(xPoint1, yPoint1, circleId, j, false, this_1._points[i].index);
902
+ pointsForLine.push(((_w = (_v = this_1._points[i].lineOptions) === null || _v === void 0 ? void 0 : _v.mode) === null || _w === void 0 ? void 0 : _w.includes('markers')) || supportsTextMode ? (React.createElement(React.Fragment, null,
903
+ React.createElement("circle", tslib_1.__assign({ id: circleId, key: circleId, r: currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, cx: xPoint1, cy: yPoint1, "data-is-focusable": isLegendSelected, onMouseOver: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale, legendVal, lineColor), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale, legendVal, lineColor), onMouseOut: this_1._handleMouseOut, onFocus: function () {
904
+ return _this_1._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData);
905
+ }, 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": (_x = this_1._points[i].data[j - 1].text) !== null && _x !== void 0 ? _x : this_1._getAriaLabel(i, j - 1) })),
906
+ !this_1._isScatterPolar && supportsTextMode && text && (React.createElement("text", { key: "".concat(circleId, "-label"), x: xPoint1, y: yPoint1 +
907
+ Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, 4) +
908
+ 12, className: classNames.markerLabel, opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01 }, text)))) : (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, legendVal, lineColor), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale, legendVal, lineColor), onMouseOut: this_1._handleMouseOut, onFocus: function () {
967
909
  return _this_1._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData);
968
- }, 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": (_x = this_1._points[i].data[j - 1].text) !== null && _x !== void 0 ? _x : this_1._getAriaLabel(i, j - 1) })),
969
- !this_1._isScatterPolar && supportsTextMode && text && (React.createElement("text", { key: "".concat(circleId, "-label"), x: this_1._xAxisScale(x1), y: yScale(y1) +
970
- Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, 4) +
971
- 12, className: classNames.markerLabel, opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01 }, text)))) : (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, legendVal, lineColor), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale, legendVal, lineColor), 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) }))));
910
+ }, 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) }))));
911
+ }
972
912
  if (j + 1 === this_1._points[i].data.length) {
973
913
  // If this is last point of the line segment.
974
914
  var lastCircleId_1 = "".concat(circleId).concat(j, "L");
975
915
  var hiddenHoverCircleId = "".concat(circleId).concat(j, "D");
976
916
  var lastPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== lastCircleId_1;
977
- path = this_1._getPath(this_1._xAxisScale(x2), yScale(y2), lastCircleId_1, j, true, this_1._points[i].index);
978
917
  var _21 = this_1._points[i].data[j], lastCirlceXCallout_1 = _21.xAxisCalloutData, lastCirlceXCalloutAccessibilityData_1 = _21.xAxisCalloutAccessibilityData;
979
918
  currentMarkerSize = this_1._points[i].data[j].markerSize;
980
919
  var lastSupportsTextMode = (_z = (_y = this_1._points[i].lineOptions) === null || _y === void 0 ? void 0 : _y.mode) === null || _z === void 0 ? void 0 : _z.includes('text');
981
920
  var lastText = this_1._points[i].data[j].text;
982
- pointsForLine.push(React.createElement(React.Fragment, { key: "".concat(lastCircleId_1, "_container") },
983
- ((_1 = (_0 = this_1._points[i].lineOptions) === null || _0 === void 0 ? void 0 : _0.mode) === null || _1 === void 0 ? void 0 : _1.includes('markers')) || lastSupportsTextMode ? (React.createElement(React.Fragment, null,
984
- 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, legendVal, lineColor), onMouseMove: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale, legendVal, lineColor), onMouseOut: this_1._handleMouseOut, onFocus: function () {
921
+ if ((0, index_3.isPlottable)(xPoint2, yPoint2)) {
922
+ var path = this_1._getPath(xPoint2, yPoint2, lastCircleId_1, j, true, this_1._points[i].index);
923
+ pointsForLine.push(React.createElement(React.Fragment, { key: "".concat(lastCircleId_1, "_container") },
924
+ ((_1 = (_0 = this_1._points[i].lineOptions) === null || _0 === void 0 ? void 0 : _0.mode) === null || _1 === void 0 ? void 0 : _1.includes('markers')) || lastSupportsTextMode ? (React.createElement(React.Fragment, null,
925
+ React.createElement("circle", tslib_1.__assign({ id: lastCircleId_1, key: lastCircleId_1, r: currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, cx: xPoint2, cy: yPoint2, "data-is-focusable": isLegendSelected, onMouseOver: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale, legendVal, lineColor), onMouseMove: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale, legendVal, lineColor), onMouseOut: this_1._handleMouseOut, onFocus: function () {
926
+ return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
927
+ }, 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": (_2 = this_1._points[i].data[j].text) !== null && _2 !== void 0 ? _2 : this_1._getAriaLabel(i, j) })),
928
+ !this_1._isScatterPolar && lastSupportsTextMode && lastText && (React.createElement("text", { key: "".concat(lastCircleId_1, "-label"), x: xPoint2, y: yPoint2 +
929
+ Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, 4) +
930
+ 12, className: classNames.markerLabel, opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01 }, text)))) : (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, legendVal, lineColor), onMouseMove: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale, legendVal, lineColor), onMouseOut: this_1._handleMouseOut, onFocus: function () {
985
931
  return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
986
- }, 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": (_2 = this_1._points[i].data[j].text) !== null && _2 !== void 0 ? _2 : this_1._getAriaLabel(i, j) })),
987
- !this_1._isScatterPolar && lastSupportsTextMode && lastText && (React.createElement("text", { key: "".concat(lastCircleId_1, "-label"), x: this_1._xAxisScale(x2), y: yScale(y2) +
988
- Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, 4) +
989
- 12, className: classNames.markerLabel, opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01 }, text)))) : (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, legendVal, lineColor), onMouseMove: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale, legendVal, lineColor), onMouseOut: this_1._handleMouseOut, onFocus: function () {
990
- return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
991
- }, 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) }))),
992
- 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, legendVal, lineColor), onMouseMove: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale, legendVal, lineColor), onMouseOut: this_1._handleMouseOut, strokeWidth: 0, focusable: false, onBlur: this_1._handleMouseOut })));
932
+ }, 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) }))),
933
+ React.createElement("circle", { id: hiddenHoverCircleId, key: hiddenHoverCircleId, r: 8, cx: xPoint2, cy: yPoint2, opacity: 0, width: 0, onMouseOver: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale, legendVal, lineColor), onMouseMove: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale, legendVal, lineColor), onMouseOut: this_1._handleMouseOut, strokeWidth: 0, focusable: false, onBlur: this_1._handleMouseOut })));
934
+ }
993
935
  }
994
- if (!this_1._hasMarkersMode || ((_4 = (_3 = this_1._points[i].lineOptions) === null || _3 === void 0 ? void 0 : _3.mode) === null || _4 === void 0 ? void 0 : _4.includes('lines'))) {
936
+ if ((0, index_3.isPlottable)(xPoint1, yPoint1) &&
937
+ (0, index_3.isPlottable)(xPoint2, yPoint2) &&
938
+ (!this_1._hasMarkersMode || ((_4 = (_3 = this_1._points[i].lineOptions) === null || _3 === void 0 ? void 0 : _3.mode) === null || _4 === void 0 ? void 0 : _4.includes('lines')))) {
995
939
  if (isLegendSelected) {
996
940
  // don't draw line if it is in a gap
997
941
  if (!isInGap) {
@@ -999,16 +943,16 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
999
943
  ? Number.parseFloat(this_1._points[i].lineOptions.lineBorderWidth.toString())
1000
944
  : 0;
1001
945
  if (lineBorderWidth > 0) {
1002
- 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: (_7 = (_6 = this_1._points[i].lineOptions) === null || _6 === void 0 ? void 0 : _6.strokeLinecap) !== null && _7 !== void 0 ? _7 : 'round', strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth, stroke: ((_8 = this_1._points[i].lineOptions) === null || _8 === void 0 ? void 0 : _8.lineBorderColor) || theme.semanticColors.bodyBackground, opacity: 1 }));
946
+ bordersForLine.push(React.createElement("line", { id: borderId, key: borderId, x1: xPoint1, y1: yPoint1, x2: xPoint2, y2: yPoint2, strokeLinecap: (_7 = (_6 = this_1._points[i].lineOptions) === null || _6 === void 0 ? void 0 : _6.strokeLinecap) !== null && _7 !== void 0 ? _7 : 'round', strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth, stroke: ((_8 = this_1._points[i].lineOptions) === null || _8 === void 0 ? void 0 : _8.lineBorderColor) || theme.semanticColors.bodyBackground, opacity: 1 }));
1003
947
  }
1004
- 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) {
948
+ linesForLine.push(React.createElement("line", tslib_1.__assign({ id: lineId, key: lineId, x1: xPoint1, y1: yPoint1, x2: xPoint2, y2: yPoint2, strokeWidth: strokeWidth, ref: function (e) {
1005
949
  _this_1._refCallback(e, lineId);
1006
950
  }, onMouseOver: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale, legendVal, lineColor), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale, legendVal, lineColor), onMouseOut: this_1._handleMouseOut, stroke: lineColor, strokeLinecap: (_10 = (_9 = this_1._points[i].lineOptions) === null || _9 === void 0 ? void 0 : _9.strokeLinecap) !== null && _10 !== void 0 ? _10 : 'round', strokeDasharray: (_11 = this_1._points[i].lineOptions) === null || _11 === void 0 ? void 0 : _11.strokeDasharray, strokeDashoffset: (_12 = this_1._points[i].lineOptions) === null || _12 === void 0 ? void 0 : _12.strokeDashoffset, opacity: 1 }, this_1._getClickHandler(this_1._points[i].onLineClick))));
1007
951
  }
1008
952
  }
1009
953
  else {
1010
954
  if (!isInGap) {
1011
- 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: (_14 = (_13 = this_1._points[i].lineOptions) === null || _13 === void 0 ? void 0 : _13.strokeLinecap) !== null && _14 !== void 0 ? _14 : 'round', strokeDasharray: (_15 = this_1._points[i].lineOptions) === null || _15 === void 0 ? void 0 : _15.strokeDasharray, strokeDashoffset: (_16 = this_1._points[i].lineOptions) === null || _16 === void 0 ? void 0 : _16.strokeDashoffset, opacity: 0.1 }));
955
+ linesForLine.push(React.createElement("line", { id: lineId, key: lineId, x1: xPoint1, y1: yPoint1, x2: xPoint2, y2: yPoint2, strokeWidth: strokeWidth, stroke: lineColor, strokeLinecap: (_14 = (_13 = this_1._points[i].lineOptions) === null || _13 === void 0 ? void 0 : _13.strokeLinecap) !== null && _14 !== void 0 ? _14 : 'round', strokeDasharray: (_15 = this_1._points[i].lineOptions) === null || _15 === void 0 ? void 0 : _15.strokeDasharray, strokeDashoffset: (_16 = this_1._points[i].lineOptions) === null || _16 === void 0 ? void 0 : _16.strokeDashoffset, opacity: 0.1 }));
1012
956
  }
1013
957
  }
1014
958
  }