@fluentui/react-charting 5.23.90 → 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.
Files changed (57) hide show
  1. package/CHANGELOG.json +55 -1
  2. package/CHANGELOG.md +24 -2
  3. package/dist/react-charting.d.ts +7 -3
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +3 -1
  7. package/lib/components/DeclarativeChart/DeclarativeChart.js +9 -2
  8. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  9. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +4 -1
  10. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +214 -85
  11. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  12. package/lib/components/LineChart/LineChart.base.d.ts +2 -0
  13. package/lib/components/LineChart/LineChart.base.js +58 -17
  14. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  15. package/lib/components/LineChart/LineChart.types.d.ts +1 -1
  16. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  17. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +2 -2
  18. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  19. package/lib/types/IDataPoint.d.ts +4 -0
  20. package/lib/types/IDataPoint.js.map +1 -1
  21. package/lib/utilities/image-export-utils.js +18 -1
  22. package/lib/utilities/image-export-utils.js.map +1 -1
  23. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +9 -2
  24. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  25. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +4 -1
  26. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +218 -86
  27. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  28. package/lib-amd/components/LineChart/LineChart.base.d.ts +2 -0
  29. package/lib-amd/components/LineChart/LineChart.base.js +58 -17
  30. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  31. package/lib-amd/components/LineChart/LineChart.types.d.ts +1 -1
  32. package/lib-amd/components/LineChart/LineChart.types.js.map +1 -1
  33. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +2 -2
  34. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  35. package/lib-amd/types/IDataPoint.d.ts +4 -0
  36. package/lib-amd/types/IDataPoint.js.map +1 -1
  37. package/lib-amd/utilities/image-export-utils.js +18 -1
  38. package/lib-amd/utilities/image-export-utils.js.map +1 -1
  39. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +9 -2
  40. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  41. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +4 -1
  42. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +218 -86
  43. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  44. package/lib-commonjs/components/LineChart/LineChart.base.d.ts +2 -0
  45. package/lib-commonjs/components/LineChart/LineChart.base.js +58 -17
  46. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  47. package/lib-commonjs/components/LineChart/LineChart.types.d.ts +1 -1
  48. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  49. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +2 -2
  50. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  51. package/lib-commonjs/types/IDataPoint.d.ts +4 -0
  52. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  53. package/lib-commonjs/utilities/image-export-utils.js +18 -1
  54. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  55. package/package.json +2 -2
  56. package/src/components/LineChart/LineChart.types.ts +1 -1
  57. package/src/components/VerticalStackedBarChart/VerticalStackedBarChart.types.ts +2 -2
@@ -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.props.lineMode === 'scatter' && xAxisType === XAxisTypes.NumericAxis) {
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 _a = _this_1.props.allowMultipleShapesForPoints, allowMultipleShapesForPoints = _a === void 0 ? false : _a;
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.props.lineMode === 'scatter') {
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.props.lineMode === 'scatter') {
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.props.lineMode === 'scatter' ? this_1._getRangeForScatterMarkerSize(yScale, yPadding) : 0;
867
+ var extraMaxPixels = this_1._hasMarkersMode ? this_1._getRangeForScatterMarkerSize(yScale, yPadding) : 0;
827
868
  if (this_1._points[i].data.length === 1) {
828
- var _3 = this_1._points[i].data[0], x1_1 = _3.x, y1 = _3.y, xAxisCalloutData_1 = _3.xAxisCalloutData, xAxisCalloutAccessibilityData_1 = _3.xAxisCalloutAccessibilityData;
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 _4 = this_1._points[i].data[j - 1], x1 = _4.x, y1 = _4.y, xAxisCalloutData = _4.xAxisCalloutData, xAxisCalloutAccessibilityData = _4.xAxisCalloutAccessibilityData;
888
- var _5 = this_1._points[i].data[j], x2 = _5.x, y2 = _5.y;
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.props.lineMode === 'scatter' ? (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) }))));
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 _6 = this_1._points[i].data[j], lastCirlceXCallout_1 = _6.xAxisCalloutData, lastCirlceXCalloutAccessibilityData_1 = _6.xAxisCalloutAccessibilityData;
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.props.lineMode === 'scatter' ? (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 () {
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.props.lineMode !== 'scatter') {
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 = ((_r = this_1._points[i].lineOptions) === null || _r === void 0 ? void 0 : _r.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: (_t = (_s = this_1._points[i].lineOptions) === null || _s === void 0 ? void 0 : _s.strokeLinecap) !== null && _t !== void 0 ? _t : 'round', strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth, stroke: ((_u = this_1._points[i].lineOptions) === null || _u === void 0 ? void 0 : _u.lineBorderColor) || theme.semanticColors.bodyBackground, opacity: 1 }));
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: (_w = (_v = this_1._points[i].lineOptions) === null || _v === void 0 ? void 0 : _v.strokeLinecap) !== null && _w !== void 0 ? _w : 'round', strokeDasharray: (_x = this_1._points[i].lineOptions) === null || _x === void 0 ? void 0 : _x.strokeDasharray, strokeDashoffset: (_y = this_1._points[i].lineOptions) === null || _y === void 0 ? void 0 : _y.strokeDashoffset, opacity: 1 }, this_1._getClickHandler(this_1._points[i].onLineClick))));
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: (_0 = (_z = this_1._points[i].lineOptions) === null || _z === void 0 ? void 0 : _z.strokeLinecap) !== null && _0 !== void 0 ? _0 : 'round', strokeDasharray: (_1 = this_1._points[i].lineOptions) === null || _1 === void 0 ? void 0 : _1.strokeDasharray, strokeDashoffset: (_2 = this_1._points[i].lineOptions) === null || _2 === void 0 ? void 0 : _2.strokeDashoffset, opacity: 0.1 }));
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
  }