@fluentui/react-charting 5.24.8 → 5.24.10

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 (135) hide show
  1. package/CHANGELOG.json +49 -1
  2. package/CHANGELOG.md +23 -2
  3. package/dist/react-charting.d.ts +150 -1
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +41 -1
  7. package/lib/FunnelChart.d.ts +1 -0
  8. package/lib/FunnelChart.js +2 -0
  9. package/lib/FunnelChart.js.map +1 -0
  10. package/lib/components/DeclarativeChart/DeclarativeChart.js +7 -1
  11. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  12. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  13. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +123 -2
  14. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  15. package/lib/components/FunnelChart/FunnelChart.base.d.ts +3 -0
  16. package/lib/components/FunnelChart/FunnelChart.base.js +264 -0
  17. package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -0
  18. package/lib/components/FunnelChart/FunnelChart.d.ts +7 -0
  19. package/lib/components/FunnelChart/FunnelChart.js +9 -0
  20. package/lib/components/FunnelChart/FunnelChart.js.map +1 -0
  21. package/lib/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
  22. package/lib/components/FunnelChart/FunnelChart.styles.js +38 -0
  23. package/lib/components/FunnelChart/FunnelChart.styles.js.map +1 -0
  24. package/lib/components/FunnelChart/FunnelChart.types.d.ts +139 -0
  25. package/lib/components/FunnelChart/FunnelChart.types.js +2 -0
  26. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -0
  27. package/lib/components/FunnelChart/funnelGeometry.d.ts +77 -0
  28. package/lib/components/FunnelChart/funnelGeometry.js +194 -0
  29. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -0
  30. package/lib/components/FunnelChart/index.d.ts +2 -0
  31. package/lib/components/FunnelChart/index.js +3 -0
  32. package/lib/components/FunnelChart/index.js.map +1 -0
  33. package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
  34. package/lib/components/HeatMapChart/HeatMapChart.base.js +2 -16
  35. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  36. package/lib/components/LineChart/LineChart.base.d.ts +4 -0
  37. package/lib/components/LineChart/LineChart.base.js +77 -56
  38. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  39. package/lib/components/LineChart/LineChart.types.d.ts +6 -0
  40. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  41. package/lib/index.d.ts +2 -0
  42. package/lib/index.js +1 -0
  43. package/lib/index.js.map +1 -1
  44. package/lib/types/IDataPoint.d.ts +1 -1
  45. package/lib/types/IDataPoint.js.map +1 -1
  46. package/lib/utilities/utilities.d.ts +3 -0
  47. package/lib/utilities/utilities.js +14 -0
  48. package/lib/utilities/utilities.js.map +1 -1
  49. package/lib-amd/FunnelChart.d.ts +1 -0
  50. package/lib-amd/FunnelChart.js +6 -0
  51. package/lib-amd/FunnelChart.js.map +1 -0
  52. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +6 -1
  53. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  54. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  55. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +125 -3
  56. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  57. package/lib-amd/components/FunnelChart/FunnelChart.base.d.ts +3 -0
  58. package/lib-amd/components/FunnelChart/FunnelChart.base.js +258 -0
  59. package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -0
  60. package/lib-amd/components/FunnelChart/FunnelChart.d.ts +7 -0
  61. package/lib-amd/components/FunnelChart/FunnelChart.js +11 -0
  62. package/lib-amd/components/FunnelChart/FunnelChart.js.map +1 -0
  63. package/lib-amd/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
  64. package/lib-amd/components/FunnelChart/FunnelChart.styles.js +43 -0
  65. package/lib-amd/components/FunnelChart/FunnelChart.styles.js.map +1 -0
  66. package/lib-amd/components/FunnelChart/FunnelChart.types.d.ts +139 -0
  67. package/lib-amd/components/FunnelChart/FunnelChart.types.js +5 -0
  68. package/lib-amd/components/FunnelChart/FunnelChart.types.js.map +1 -0
  69. package/lib-amd/components/FunnelChart/funnelGeometry.d.ts +77 -0
  70. package/lib-amd/components/FunnelChart/funnelGeometry.js +204 -0
  71. package/lib-amd/components/FunnelChart/funnelGeometry.js.map +1 -0
  72. package/lib-amd/components/FunnelChart/index.d.ts +2 -0
  73. package/lib-amd/components/FunnelChart/index.js +7 -0
  74. package/lib-amd/components/FunnelChart/index.js.map +1 -0
  75. package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
  76. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +2 -15
  77. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  78. package/lib-amd/components/LineChart/LineChart.base.d.ts +4 -0
  79. package/lib-amd/components/LineChart/LineChart.base.js +77 -56
  80. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  81. package/lib-amd/components/LineChart/LineChart.types.d.ts +6 -0
  82. package/lib-amd/components/LineChart/LineChart.types.js.map +1 -1
  83. package/lib-amd/index.d.ts +2 -0
  84. package/lib-amd/index.js +3 -2
  85. package/lib-amd/index.js.map +1 -1
  86. package/lib-amd/types/IDataPoint.d.ts +1 -1
  87. package/lib-amd/types/IDataPoint.js.map +1 -1
  88. package/lib-amd/utilities/utilities.d.ts +3 -0
  89. package/lib-amd/utilities/utilities.js +17 -2
  90. package/lib-amd/utilities/utilities.js.map +1 -1
  91. package/lib-commonjs/FunnelChart.d.ts +1 -0
  92. package/lib-commonjs/FunnelChart.js +5 -0
  93. package/lib-commonjs/FunnelChart.js.map +1 -0
  94. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +6 -0
  95. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  96. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  97. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +125 -3
  98. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  99. package/lib-commonjs/components/FunnelChart/FunnelChart.base.d.ts +3 -0
  100. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +267 -0
  101. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -0
  102. package/lib-commonjs/components/FunnelChart/FunnelChart.d.ts +7 -0
  103. package/lib-commonjs/components/FunnelChart/FunnelChart.js +12 -0
  104. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -0
  105. package/lib-commonjs/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
  106. package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js +42 -0
  107. package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js.map +1 -0
  108. package/lib-commonjs/components/FunnelChart/FunnelChart.types.d.ts +139 -0
  109. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +3 -0
  110. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -0
  111. package/lib-commonjs/components/FunnelChart/funnelGeometry.d.ts +77 -0
  112. package/lib-commonjs/components/FunnelChart/funnelGeometry.js +202 -0
  113. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -0
  114. package/lib-commonjs/components/FunnelChart/index.d.ts +2 -0
  115. package/lib-commonjs/components/FunnelChart/index.js +6 -0
  116. package/lib-commonjs/components/FunnelChart/index.js.map +1 -0
  117. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
  118. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +1 -15
  119. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  120. package/lib-commonjs/components/LineChart/LineChart.base.d.ts +4 -0
  121. package/lib-commonjs/components/LineChart/LineChart.base.js +77 -56
  122. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  123. package/lib-commonjs/components/LineChart/LineChart.types.d.ts +6 -0
  124. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  125. package/lib-commonjs/index.d.ts +2 -0
  126. package/lib-commonjs/index.js +3 -1
  127. package/lib-commonjs/index.js.map +1 -1
  128. package/lib-commonjs/types/IDataPoint.d.ts +1 -1
  129. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  130. package/lib-commonjs/utilities/utilities.d.ts +3 -0
  131. package/lib-commonjs/utilities/utilities.js +17 -1
  132. package/lib-commonjs/utilities/utilities.js.map +1 -1
  133. package/package.json +2 -2
  134. package/src/components/FunnelChart/FunnelChart.types.ts +153 -0
  135. package/src/components/LineChart/LineChart.types.ts +7 -0
@@ -58,6 +58,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
58
58
  _this_1._yPaddingPrimary = 0;
59
59
  _this_1._yPaddingSecondary = 0;
60
60
  _this_1._hasMarkersMode = false;
61
+ _this_1._isXAxisDateType = false;
61
62
  _this_1.toImage = function (opts) {
62
63
  var _a, _b;
63
64
  return (0, image_export_utils_1.toImage)((_a = _this_1._cartesianChartRef.current) === null || _a === void 0 ? void 0 : _a.chartContainer, (_b = _this_1._legendsRef.current) === null || _b === void 0 ? void 0 : _b.toSVG, _this_1._isRTL, opts);
@@ -404,10 +405,11 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
404
405
  });
405
406
  }
406
407
  };
407
- _this_1._handleHover = function (x, y, lineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale, mouseEvent) {
408
+ _this_1._handleHover = function (x, y, lineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale, legendVal, lineColor, mouseEvent) {
408
409
  mouseEvent.persist();
409
410
  var formattedData = x instanceof Date ? (0, chart_utilities_1.formatDateToLocaleString)(x, _this_1.props.culture, _this_1.props.useUTC) : x;
410
411
  var xVal = x instanceof Date ? x.getTime() : x;
412
+ var yVal = y instanceof Date ? y.getTime() : y;
411
413
  var _this = _this_1;
412
414
  var found = (0, Utilities_1.find)(_this_1._calloutPoints, function (element) { return element.x === xVal; });
413
415
  // if no points need to be called out then don't show vertical line and callout card
@@ -423,6 +425,9 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
423
425
  refSelected: "#".concat(circleId),
424
426
  hoverXValue: xAxisCalloutData ? xAxisCalloutData : '' + formattedData,
425
427
  YValueHover: found.values,
428
+ YValue: yVal,
429
+ legendVal: legendVal,
430
+ lineColor: lineColor,
426
431
  stackCalloutProps: found,
427
432
  dataPointCalloutProps: found,
428
433
  activePoint: circleId,
@@ -585,17 +590,14 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
585
590
  };
586
591
  _this_1._getDomainNRangeValuesOfDateWithPadding = function (points, margins, width, isRTL, tickValues, chartType, barWidth) {
587
592
  if (tickValues === void 0) { tickValues = []; }
588
- var sDate;
589
- var lDate;
590
- sDate = (0, d3_array_2.min)(points, function (point) {
591
- return (0, d3_array_2.min)(point.data, function (item) { return item.x; });
592
- });
593
- lDate = (0, d3_array_2.max)(points, function (point) {
594
- return (0, d3_array_2.max)(point.data, function (item) { return item.x; });
595
- });
593
+ _this_1._setXMinMaxValues(points);
596
594
  // Include tickValues if present
597
- sDate = (0, d3_array_2.min)(tslib_1.__spreadArray(tslib_1.__spreadArray([], tickValues, true), [sDate], false));
598
- lDate = (0, d3_array_2.max)(tslib_1.__spreadArray(tslib_1.__spreadArray([], tickValues, true), [lDate], false));
595
+ var sDate = tickValues && tickValues.length > 0
596
+ ? (0, d3_array_2.min)(tslib_1.__spreadArray(tslib_1.__spreadArray([], tickValues, true), [new Date(_this_1._xMin)], false))
597
+ : new Date(_this_1._xMin);
598
+ var lDate = tickValues && tickValues.length > 0
599
+ ? (0, d3_array_2.max)(tslib_1.__spreadArray(tslib_1.__spreadArray([], tickValues, true), [new Date(_this_1._xMax)], false))
600
+ : new Date(_this_1._xMax);
599
601
  // Calculate time-based padding (e.g. 10% of the date range)
600
602
  var dateRange = lDate.getTime() - sDate.getTime();
601
603
  var datePadding = _this_1._hasMarkersMode ? dateRange * 0.1 : 0;
@@ -618,14 +620,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
618
620
  };
619
621
  };
620
622
  _this_1._getDomainNRangeValuesWithPadding = function (points, margins, width, isRTL) {
621
- _this_1._xMin = (0, d3_array_2.min)(points, function (point) {
622
- return (0, d3_array_2.min)(point.data, function (item) { return item.x; });
623
- });
624
- _this_1._xMax = (0, d3_array_2.max)(points, function (point) {
625
- return (0, d3_array_2.max)(point.data, function (item) {
626
- return item.x;
627
- });
628
- });
623
+ _this_1._setXMinMaxValues(points);
629
624
  if (_this_1._hasMarkersMode) {
630
625
  _this_1._xPadding = (_this_1._xMax - _this_1._xMin) * 0.1;
631
626
  }
@@ -649,11 +644,22 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
649
644
  var _a = _this_1.props.data, chartTitle = _a.chartTitle, lineChartData = _a.lineChartData;
650
645
  return (chartTitle ? "".concat(chartTitle, ". ") : '') + "Line chart with ".concat((lineChartData === null || lineChartData === void 0 ? void 0 : lineChartData.length) || 0, " lines. ");
651
646
  };
647
+ _this_1._setXMinMaxValues = function (points) {
648
+ var getX = function (item) { return (_this_1._isXAxisDateType ? item.x : item.x); };
649
+ var minVal = (0, d3_array_2.min)(points, function (point) { return (0, d3_array_2.min)(point.data, getX); });
650
+ var maxVal = (0, d3_array_2.max)(points, function (point) { return (0, d3_array_2.max)(point.data, getX); });
651
+ _this_1._xMin = _this_1._isXAxisDateType ? minVal.getTime() : minVal;
652
+ _this_1._xMax = _this_1._isXAxisDateType ? maxVal.getTime() : maxVal;
653
+ _this_1._xMin = _this_1._xMin === Number.NEGATIVE_INFINITY || !_this_1._xMin ? 0 : _this_1._xMin;
654
+ _this_1._xMax = _this_1._xMax === Number.POSITIVE_INFINITY || !_this_1._xMax ? 0 : _this_1._xMax;
655
+ };
652
656
  (0, Utilities_1.initializeComponentRef)(_this_1);
653
657
  _this_1.state = {
654
658
  hoverXValue: '',
655
659
  activeLegend: '',
656
660
  YValueHover: [],
661
+ YValue: '',
662
+ legendVal: '',
657
663
  refSelected: '',
658
664
  selectedLegend: (_b = (_a = props.legendProps) === null || _a === void 0 ? void 0 : _a.selectedLegend) !== null && _b !== void 0 ? _b : '',
659
665
  isCalloutVisible: false,
@@ -710,7 +716,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
710
716
  var _this_1 = this;
711
717
  var _a = this.props, tickValues = _a.tickValues, tickFormat = _a.tickFormat, eventAnnotationProps = _a.eventAnnotationProps, legendProps = _a.legendProps, data = _a.data;
712
718
  this._points = this._injectIndexPropertyInLineChartData(data.lineChartData);
713
- var isXAxisDateType = (0, index_3.getXAxisType)(this._points);
719
+ this._isXAxisDateType = (0, index_3.getXAxisType)(this._points);
714
720
  var points = this._points;
715
721
  if (legendProps && !!legendProps.canSelectMultipleLegends) {
716
722
  points = this.state.selectedLegendPoints.length >= 1 ? this.state.selectedLegendPoints : this._points;
@@ -723,14 +729,14 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
723
729
  if (!this.props.hideLegend) {
724
730
  legendBars = this._createLegendsMemoized(this._points);
725
731
  }
726
- var calloutProps = tslib_1.__assign({ isCalloutVisible: this.state.isCalloutVisible, directionalHint: Callout_1.DirectionalHint.topAutoEdge, YValueHover: this.state.YValueHover, hoverXValue: this.state.hoverXValue, id: "toolTip".concat(this._uniqueCallOutID), target: this.state.refSelected, isBeakVisible: false, gapSpace: 15, onDismiss: this._closeCallout, preventDismissOnEvent: function () { return true; }, hidden: !(!this.props.hideTooltip && this.state.isCalloutVisible), descriptionMessage: this.props.getCalloutDescriptionMessage && this.state.stackCalloutProps
732
+ var calloutProps = tslib_1.__assign({ isCalloutVisible: this.state.isCalloutVisible, directionalHint: Callout_1.DirectionalHint.topAutoEdge, YValueHover: this.state.YValueHover, hoverXValue: this.state.hoverXValue, YValue: this.state.YValue, legend: this.state.legendVal, color: this.state.lineColor, XValue: this.state.hoverXValue, id: "toolTip".concat(this._uniqueCallOutID), target: this.state.refSelected, isBeakVisible: false, gapSpace: 15, onDismiss: this._closeCallout, preventDismissOnEvent: function () { return true; }, hidden: !(!this.props.hideTooltip && this.state.isCalloutVisible), descriptionMessage: this.props.getCalloutDescriptionMessage && this.state.stackCalloutProps
727
733
  ? this.props.getCalloutDescriptionMessage(this.state.stackCalloutProps)
728
734
  : undefined, 'data-is-focusable': true, xAxisCalloutAccessibilityData: this.state.xAxisCalloutAccessibilityData }, this.props.calloutProps);
729
735
  var tickParams = {
730
736
  tickValues: tickValues,
731
737
  tickFormat: tickFormat,
732
738
  };
733
- return !this._isChartEmpty() ? (React.createElement(index_2.CartesianChart, tslib_1.__assign({}, this.props, { chartTitle: this._getChartTitle(), points: points, chartType: index_3.ChartTypes.LineChart, isCalloutForStack: true, calloutProps: calloutProps, tickParams: tickParams, legendBars: legendBars, createYAxis: index_3.createNumericYAxis, getmargins: this._getMargins, getMinMaxOfYAxis: this._getNumericMinMaxOfY, getGraphData: this._initializeLineChartData, xAxisType: isXAxisDateType ? index_3.XAxisTypes.DateAxis : index_3.XAxisTypes.NumericAxis, customizedCallout: this._getCustomizedCallout(), getDomainNRangeValues: this._getDomainNRangeValues, createStringYAxis: index_3.createStringYAxis, onChartMouseLeave: this._handleChartMouseLeave, enableFirstRenderOptimization: this.props.enablePerfOptimization && this._firstRenderOptimization, ref: this._cartesianChartRef,
739
+ return !this._isChartEmpty() ? (React.createElement(index_2.CartesianChart, tslib_1.__assign({}, this.props, { chartTitle: this._getChartTitle(), points: points, chartType: index_3.ChartTypes.LineChart, calloutProps: calloutProps, tickParams: tickParams, legendBars: legendBars, createYAxis: index_3.createNumericYAxis, getmargins: this._getMargins, getMinMaxOfYAxis: this._getNumericMinMaxOfY, getGraphData: this._initializeLineChartData, xAxisType: this._isXAxisDateType ? index_3.XAxisTypes.DateAxis : index_3.XAxisTypes.NumericAxis, customizedCallout: this._getCustomizedCallout(), getDomainNRangeValues: this._getDomainNRangeValues, createStringYAxis: index_3.createStringYAxis, onChartMouseLeave: this._handleChartMouseLeave, enableFirstRenderOptimization: this.props.enablePerfOptimization && this._firstRenderOptimization, ref: this._cartesianChartRef,
734
740
  /* eslint-disable react/jsx-no-bind */
735
741
  // eslint-disable-next-line react/no-children-prop
736
742
  children: function (props) {
@@ -833,7 +839,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
833
839
  };
834
840
  LineChartBase.prototype._createLines = function (xElement, containerHeight) {
835
841
  var _this_1 = this;
836
- 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, _9, _10;
842
+ 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, _9, _10, _11, _12, _13, _14, _15, _16;
837
843
  var lines = [];
838
844
  if (this.state.isSelectedLegend) {
839
845
  this._points = this.state.selectedLegendPoints;
@@ -862,21 +868,27 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
862
868
  var yPadding = this_1._points[i].useSecondaryYScale && this_1._yScaleSecondary ? this_1._yPaddingSecondary : this_1._yPaddingPrimary;
863
869
  var extraMaxPixels = this_1._hasMarkersMode ? this_1._getRangeForScatterMarkerSize(yScale, yPadding) : 0;
864
870
  if (this_1._points[i].data.length === 1) {
865
- var _11 = this_1._points[i].data[0], x1_1 = _11.x, y1 = _11.y, xAxisCalloutData_1 = _11.xAxisCalloutData, xAxisCalloutAccessibilityData_1 = _11.xAxisCalloutAccessibilityData;
871
+ var _17 = this_1._points[i].data[0], x1_1 = _17.x, y1 = _17.y, xAxisCalloutData_1 = _17.xAxisCalloutData, xAxisCalloutAccessibilityData_1 = _17.xAxisCalloutAccessibilityData;
866
872
  var circleId_1 = "".concat(this_1._circleId, "_").concat(i);
867
873
  var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
868
874
  var currentMarkerSize = this_1._points[i].data[0].markerSize;
869
- pointsForLine.push(React.createElement("circle", tslib_1.__assign({ id: circleId_1, key: circleId_1, r: currentMarkerSize
870
- ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize
871
- : activePoint === circleId_1
872
- ? 5.5
873
- : 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), onMouseMove: this_1._handleHover.bind(this_1, x1_1, y1, verticaLineHeight, xAxisCalloutData_1, circleId_1, xAxisCalloutAccessibilityData_1, yScale), 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) {
874
- _this_1._refCallback(e, circleId_1);
875
- }, 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))));
875
+ 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');
876
+ var text = this_1._points[i].data[0].text;
877
+ pointsForLine.push(React.createElement(React.Fragment, { key: "".concat(circleId_1, "_fragment") },
878
+ React.createElement("circle", tslib_1.__assign({ id: circleId_1, key: circleId_1, r: currentMarkerSize
879
+ ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize
880
+ : activePoint === circleId_1
881
+ ? 5.5
882
+ : 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) {
883
+ _this_1._refCallback(e, circleId_1);
884
+ }, 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))),
885
+ supportsTextMode && text && (React.createElement("text", { key: "".concat(circleId_1, "-label"), x: this_1._xAxisScale(x1_1), y: yScale(y1) +
886
+ Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 3.5, 4) +
887
+ 12, className: classNames.markerLabel, opacity: isLegendSelected ? 1 : 0.1 }, text))));
876
888
  }
877
889
  var gapIndex = 0;
878
- var gaps = (_b = (_a = this_1._points[i].gaps) === null || _a === void 0 ? void 0 : _a.sort(function (a, b) { return a.startIndex - b.startIndex; })) !== null && _b !== void 0 ? _b : [];
879
- var lineCurve = (_c = this_1._points[i].lineOptions) === null || _c === void 0 ? void 0 : _c.curve;
890
+ 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 : [];
891
+ var lineCurve = (_e = this_1._points[i].lineOptions) === null || _e === void 0 ? void 0 : _e.curve;
880
892
  // Use path rendering technique for larger datasets to optimize performance.
881
893
  if ((this_1.props.optimizeLargeData || lineCurve) && this_1._points[i].data.length > 1) {
882
894
  var line = (0, d3_shape_1.line)()
@@ -887,7 +899,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
887
899
  .curve((0, index_3.getCurveFactory)(lineCurve));
888
900
  var lineId = "".concat(this_1._lineId, "_").concat(i);
889
901
  var borderId = "".concat(this_1._borderId, "_").concat(i);
890
- var strokeWidth = ((_d = this_1._points[i].lineOptions) === null || _d === void 0 ? void 0 : _d.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
902
+ var strokeWidth = ((_f = this_1._points[i].lineOptions) === null || _f === void 0 ? void 0 : _f.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
891
903
  var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
892
904
  var lineData = [];
893
905
  for (var k = 0; k < this_1._points[i].data.length; k++) {
@@ -899,16 +911,16 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
899
911
  ]);
900
912
  }
901
913
  if (isLegendSelected) {
902
- var lineBorderWidth = ((_e = this_1._points[i].lineOptions) === null || _e === void 0 ? void 0 : _e.lineBorderWidth)
914
+ var lineBorderWidth = ((_g = this_1._points[i].lineOptions) === null || _g === void 0 ? void 0 : _g.lineBorderWidth)
903
915
  ? Number.parseFloat(this_1._points[i].lineOptions.lineBorderWidth.toString())
904
916
  : 0;
905
917
  if (lineBorderWidth > 0) {
906
- bordersForLine.push(React.createElement("path", { id: borderId, key: borderId, d: line(lineData), fill: "transparent", strokeLinecap: (_g = (_f = this_1._points[i].lineOptions) === null || _f === void 0 ? void 0 : _f.strokeLinecap) !== null && _g !== void 0 ? _g : 'round', strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth, stroke: ((_h = this_1._points[i].lineOptions) === null || _h === void 0 ? void 0 : _h.lineBorderColor) || theme.semanticColors.bodyBackground, opacity: 1 }));
918
+ bordersForLine.push(React.createElement("path", { id: borderId, key: borderId, d: line(lineData), fill: "transparent", strokeLinecap: (_j = (_h = this_1._points[i].lineOptions) === null || _h === void 0 ? void 0 : _h.strokeLinecap) !== null && _j !== void 0 ? _j : 'round', strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth, stroke: ((_k = this_1._points[i].lineOptions) === null || _k === void 0 ? void 0 : _k.lineBorderColor) || theme.semanticColors.bodyBackground, opacity: 1 }));
907
919
  }
908
- linesForLine.push(React.createElement("path", tslib_1.__assign({ id: lineId, key: lineId, d: line(lineData), fill: "transparent", "data-is-focusable": true, stroke: lineColor, strokeWidth: strokeWidth, strokeLinecap: (_k = (_j = this_1._points[i].lineOptions) === null || _j === void 0 ? void 0 : _j.strokeLinecap) !== null && _k !== void 0 ? _k : 'round', strokeDasharray: (_l = this_1._points[i].lineOptions) === null || _l === void 0 ? void 0 : _l.strokeDasharray, onMouseMove: this_1._onMouseOverLargeDataset.bind(this_1, i, verticaLineHeight, yScale), onMouseOver: this_1._onMouseOverLargeDataset.bind(this_1, i, verticaLineHeight, yScale), onMouseOut: this_1._handleMouseOut }, this_1._getClickHandler(this_1._points[i].onLineClick), { opacity: 1 })));
920
+ linesForLine.push(React.createElement("path", tslib_1.__assign({ id: lineId, key: lineId, d: line(lineData), fill: "transparent", "data-is-focusable": true, stroke: lineColor, strokeWidth: strokeWidth, strokeLinecap: (_m = (_l = this_1._points[i].lineOptions) === null || _l === void 0 ? void 0 : _l.strokeLinecap) !== null && _m !== void 0 ? _m : 'round', strokeDasharray: (_o = this_1._points[i].lineOptions) === null || _o === void 0 ? void 0 : _o.strokeDasharray, onMouseMove: this_1._onMouseOverLargeDataset.bind(this_1, i, verticaLineHeight, yScale), onMouseOver: this_1._onMouseOverLargeDataset.bind(this_1, i, verticaLineHeight, yScale), onMouseOut: this_1._handleMouseOut }, this_1._getClickHandler(this_1._points[i].onLineClick), { opacity: 1 })));
909
921
  }
910
922
  else {
911
- linesForLine.push(React.createElement("path", { id: lineId, key: lineId, d: line(lineData), fill: "transparent", "data-is-focusable": false, stroke: lineColor, strokeWidth: strokeWidth, strokeLinecap: (_o = (_m = this_1._points[i].lineOptions) === null || _m === void 0 ? void 0 : _m.strokeLinecap) !== null && _o !== void 0 ? _o : 'round', strokeDasharray: (_p = this_1._points[i].lineOptions) === null || _p === void 0 ? void 0 : _p.strokeDasharray, opacity: 0.1 }));
923
+ linesForLine.push(React.createElement("path", { id: lineId, key: lineId, d: line(lineData), fill: "transparent", "data-is-focusable": false, stroke: lineColor, strokeWidth: strokeWidth, strokeLinecap: (_q = (_p = this_1._points[i].lineOptions) === null || _p === void 0 ? void 0 : _p.strokeLinecap) !== null && _q !== void 0 ? _q : 'round', strokeDasharray: (_r = this_1._points[i].lineOptions) === null || _r === void 0 ? void 0 : _r.strokeDasharray, opacity: 0.1 }));
912
924
  }
913
925
  var isPointHighlighted = this_1.state.activeLine !== null && this_1.state.activeLine === i;
914
926
  pointsForLine.push(React.createElement("circle", { id: "".concat(this_1._staticHighlightCircle, "_").concat(i), key: "".concat(this_1._staticHighlightCircle, "_").concat(i), r: 5.5, cx: 0, cy: 0, fill: theme.semanticColors.bodyBackground, strokeWidth: DEFAULT_LINE_STROKE_SIZE, stroke: lineColor, visibility: isPointHighlighted ? 'visibility' : 'hidden', onMouseMove: this_1._onMouseOverLargeDataset.bind(this_1, i, verticaLineHeight, yScale), onMouseOver: this_1._onMouseOverLargeDataset.bind(this_1, i, verticaLineHeight, yScale), onMouseOut: this_1._handleMouseOut }));
@@ -921,54 +933,62 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
921
933
  var lineId = "".concat(this_1._lineId, "_").concat(i, "_").concat(j);
922
934
  var borderId = "".concat(this_1._borderId, "_").concat(i, "_").concat(j);
923
935
  var circleId = "".concat(this_1._circleId, "_").concat(i, "_").concat(j);
924
- var _12 = this_1._points[i].data[j - 1], x1 = _12.x, y1 = _12.y, xAxisCalloutData = _12.xAxisCalloutData, xAxisCalloutAccessibilityData = _12.xAxisCalloutAccessibilityData;
925
- var _13 = this_1._points[i].data[j], x2 = _13.x, y2 = _13.y;
936
+ var _18 = this_1._points[i].data[j - 1], x1 = _18.x, y1 = _18.y, xAxisCalloutData = _18.xAxisCalloutData, xAxisCalloutAccessibilityData = _18.xAxisCalloutAccessibilityData;
937
+ var _19 = this_1._points[i].data[j], x2 = _19.x, y2 = _19.y;
926
938
  var path = this_1._getPath(this_1._xAxisScale(x1), yScale(y1), circleId, j, false, this_1._points[i].index);
927
- var strokeWidth = ((_q = this_1._points[i].lineOptions) === null || _q === void 0 ? void 0 : _q.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
939
+ var strokeWidth = ((_s = this_1._points[i].lineOptions) === null || _s === void 0 ? void 0 : _s.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
928
940
  var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
929
941
  var currentPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== circleId;
942
+ 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');
943
+ var text = this_1._points[i].data[j - 1].text;
930
944
  var currentMarkerSize = this_1._points[i].data[j - 1].markerSize;
931
- 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(React.Fragment, null,
932
- React.createElement("circle", tslib_1.__assign({ id: circleId, key: circleId, r: currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, cx: this_1._xAxisScale(x1), cy: yScale(y1), "data-is-focusable": isLegendSelected, onMouseOver: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale), onMouseOut: this_1._handleMouseOut, onFocus: function () {
945
+ 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,
946
+ 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 () {
933
947
  return _this_1._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData);
934
- }, 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": (_t = this_1._points[i].data[j - 1].text) !== null && _t !== void 0 ? _t : this_1._getAriaLabel(i, j - 1) })),
935
- this_1._points[i].data[j - 1].text && (React.createElement("text", { key: "".concat(circleId, "-label"), x: this_1._xAxisScale(x1), y: yScale(y1) + 35, fontSize: 12, fill: theme === null || theme === void 0 ? void 0 : theme.semanticColors.bodyText, textAnchor: "middle", className: classNames.markerLabel }, this_1._points[i].data[j - 1].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), 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) }))));
948
+ }, 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) })),
949
+ supportsTextMode && text && (React.createElement("text", { key: "".concat(circleId, "-label"), x: this_1._xAxisScale(x1), y: yScale(y1) +
950
+ Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, 4) +
951
+ 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) }))));
936
952
  if (j + 1 === this_1._points[i].data.length) {
937
953
  // If this is last point of the line segment.
938
954
  var lastCircleId_1 = "".concat(circleId).concat(j, "L");
939
955
  var hiddenHoverCircleId = "".concat(circleId).concat(j, "D");
940
956
  var lastPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== lastCircleId_1;
941
957
  path = this_1._getPath(this_1._xAxisScale(x2), yScale(y2), lastCircleId_1, j, true, this_1._points[i].index);
942
- var _14 = this_1._points[i].data[j], lastCirlceXCallout_1 = _14.xAxisCalloutData, lastCirlceXCalloutAccessibilityData_1 = _14.xAxisCalloutAccessibilityData;
958
+ var _20 = this_1._points[i].data[j], lastCirlceXCallout_1 = _20.xAxisCalloutData, lastCirlceXCalloutAccessibilityData_1 = _20.xAxisCalloutAccessibilityData;
943
959
  currentMarkerSize = this_1._points[i].data[j].markerSize;
960
+ 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');
961
+ var lastText = this_1._points[i].data[j].text;
944
962
  pointsForLine.push(React.createElement(React.Fragment, { key: "".concat(lastCircleId_1, "_container") },
945
- ((_v = (_u = this_1._points[i].lineOptions) === null || _u === void 0 ? void 0 : _u.mode) === null || _v === void 0 ? void 0 : _v.includes('markers')) ? (React.createElement(React.Fragment, null,
946
- React.createElement("circle", tslib_1.__assign({ id: lastCircleId_1, key: lastCircleId_1, r: currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, cx: this_1._xAxisScale(x2), cy: yScale(y2), "data-is-focusable": isLegendSelected, onMouseOver: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale), onMouseMove: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale), onMouseOut: this_1._handleMouseOut, onFocus: function () {
963
+ ((_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,
964
+ 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 () {
947
965
  return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
948
- }, 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": (_w = this_1._points[i].data[j].text) !== null && _w !== void 0 ? _w : this_1._getAriaLabel(i, j) })),
949
- this_1._points[i].data[j].text && (React.createElement("text", { key: "".concat(lastCircleId_1, "-label"), x: this_1._xAxisScale(x2), y: yScale(y2) + 35, fontSize: 12, fill: theme === null || theme === void 0 ? void 0 : theme.semanticColors.bodyText, textAnchor: "middle", className: classNames.markerLabel }, this_1._points[i].data[j].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), onMouseMove: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1, yScale), onMouseOut: this_1._handleMouseOut, onFocus: function () {
966
+ }, 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) })),
967
+ lastSupportsTextMode && lastText && (React.createElement("text", { key: "".concat(lastCircleId_1, "-label"), x: this_1._xAxisScale(x2), y: yScale(y2) +
968
+ Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, 4) +
969
+ 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 () {
950
970
  return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
951
971
  }, 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) }))),
952
- 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 })));
972
+ 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 })));
953
973
  }
954
- if (!this_1._hasMarkersMode || ((_y = (_x = this_1._points[i].lineOptions) === null || _x === void 0 ? void 0 : _x.mode) === null || _y === void 0 ? void 0 : _y.includes('lines'))) {
974
+ 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'))) {
955
975
  if (isLegendSelected) {
956
976
  // don't draw line if it is in a gap
957
977
  if (!isInGap) {
958
- var lineBorderWidth = ((_z = this_1._points[i].lineOptions) === null || _z === void 0 ? void 0 : _z.lineBorderWidth)
978
+ var lineBorderWidth = ((_5 = this_1._points[i].lineOptions) === null || _5 === void 0 ? void 0 : _5.lineBorderWidth)
959
979
  ? Number.parseFloat(this_1._points[i].lineOptions.lineBorderWidth.toString())
960
980
  : 0;
961
981
  if (lineBorderWidth > 0) {
962
- 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: (_1 = (_0 = this_1._points[i].lineOptions) === null || _0 === void 0 ? void 0 : _0.strokeLinecap) !== null && _1 !== void 0 ? _1 : 'round', strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth, stroke: ((_2 = this_1._points[i].lineOptions) === null || _2 === void 0 ? void 0 : _2.lineBorderColor) || theme.semanticColors.bodyBackground, opacity: 1 }));
982
+ 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 }));
963
983
  }
964
984
  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) {
965
985
  _this_1._refCallback(e, lineId);
966
- }, 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: (_4 = (_3 = this_1._points[i].lineOptions) === null || _3 === void 0 ? void 0 : _3.strokeLinecap) !== null && _4 !== void 0 ? _4 : 'round', strokeDasharray: (_5 = this_1._points[i].lineOptions) === null || _5 === void 0 ? void 0 : _5.strokeDasharray, strokeDashoffset: (_6 = this_1._points[i].lineOptions) === null || _6 === void 0 ? void 0 : _6.strokeDashoffset, opacity: 1 }, this_1._getClickHandler(this_1._points[i].onLineClick))));
986
+ }, 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))));
967
987
  }
968
988
  }
969
989
  else {
970
990
  if (!isInGap) {
971
- 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: (_8 = (_7 = this_1._points[i].lineOptions) === null || _7 === void 0 ? void 0 : _7.strokeLinecap) !== null && _8 !== void 0 ? _8 : 'round', strokeDasharray: (_9 = this_1._points[i].lineOptions) === null || _9 === void 0 ? void 0 : _9.strokeDasharray, strokeDashoffset: (_10 = this_1._points[i].lineOptions) === null || _10 === void 0 ? void 0 : _10.strokeDashoffset, opacity: 0.1 }));
991
+ 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 }));
972
992
  }
973
993
  }
974
994
  }
@@ -1023,6 +1043,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
1023
1043
  LineChartBase.defaultProps = {
1024
1044
  enableReflow: true,
1025
1045
  useUTC: true,
1046
+ isCalloutForStack: false,
1026
1047
  };
1027
1048
  return LineChartBase;
1028
1049
  }(React.Component));