@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.
- package/CHANGELOG.json +49 -1
- package/CHANGELOG.md +23 -2
- package/dist/react-charting.d.ts +150 -1
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +41 -1
- package/lib/FunnelChart.d.ts +1 -0
- package/lib/FunnelChart.js +2 -0
- package/lib/FunnelChart.js.map +1 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js +7 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +123 -2
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.base.d.ts +3 -0
- package/lib/components/FunnelChart/FunnelChart.base.js +264 -0
- package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -0
- package/lib/components/FunnelChart/FunnelChart.d.ts +7 -0
- package/lib/components/FunnelChart/FunnelChart.js +9 -0
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -0
- package/lib/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
- package/lib/components/FunnelChart/FunnelChart.styles.js +38 -0
- package/lib/components/FunnelChart/FunnelChart.styles.js.map +1 -0
- package/lib/components/FunnelChart/FunnelChart.types.d.ts +139 -0
- package/lib/components/FunnelChart/FunnelChart.types.js +2 -0
- package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -0
- package/lib/components/FunnelChart/funnelGeometry.d.ts +77 -0
- package/lib/components/FunnelChart/funnelGeometry.js +194 -0
- package/lib/components/FunnelChart/funnelGeometry.js.map +1 -0
- package/lib/components/FunnelChart/index.d.ts +2 -0
- package/lib/components/FunnelChart/index.js +3 -0
- package/lib/components/FunnelChart/index.js.map +1 -0
- package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js +2 -16
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.d.ts +4 -0
- package/lib/components/LineChart/LineChart.base.js +77 -56
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.types.d.ts +6 -0
- package/lib/components/LineChart/LineChart.types.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/IDataPoint.d.ts +1 -1
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/utilities/utilities.d.ts +3 -0
- package/lib/utilities/utilities.js +14 -0
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/FunnelChart.d.ts +1 -0
- package/lib-amd/FunnelChart.js +6 -0
- package/lib-amd/FunnelChart.js.map +1 -0
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +6 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +125 -3
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/FunnelChart/FunnelChart.base.d.ts +3 -0
- package/lib-amd/components/FunnelChart/FunnelChart.base.js +258 -0
- package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -0
- package/lib-amd/components/FunnelChart/FunnelChart.d.ts +7 -0
- package/lib-amd/components/FunnelChart/FunnelChart.js +11 -0
- package/lib-amd/components/FunnelChart/FunnelChart.js.map +1 -0
- package/lib-amd/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
- package/lib-amd/components/FunnelChart/FunnelChart.styles.js +43 -0
- package/lib-amd/components/FunnelChart/FunnelChart.styles.js.map +1 -0
- package/lib-amd/components/FunnelChart/FunnelChart.types.d.ts +139 -0
- package/lib-amd/components/FunnelChart/FunnelChart.types.js +5 -0
- package/lib-amd/components/FunnelChart/FunnelChart.types.js.map +1 -0
- package/lib-amd/components/FunnelChart/funnelGeometry.d.ts +77 -0
- package/lib-amd/components/FunnelChart/funnelGeometry.js +204 -0
- package/lib-amd/components/FunnelChart/funnelGeometry.js.map +1 -0
- package/lib-amd/components/FunnelChart/index.d.ts +2 -0
- package/lib-amd/components/FunnelChart/index.js +7 -0
- package/lib-amd/components/FunnelChart/index.js.map +1 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +2 -15
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.d.ts +4 -0
- package/lib-amd/components/LineChart/LineChart.base.js +77 -56
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.types.d.ts +6 -0
- package/lib-amd/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-amd/index.d.ts +2 -0
- package/lib-amd/index.js +3 -2
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/types/IDataPoint.d.ts +1 -1
- package/lib-amd/types/IDataPoint.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +3 -0
- package/lib-amd/utilities/utilities.js +17 -2
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/FunnelChart.d.ts +1 -0
- package/lib-commonjs/FunnelChart.js +5 -0
- package/lib-commonjs/FunnelChart.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +6 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +125 -3
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.d.ts +3 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +267 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.d.ts +7 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +12 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.styles.d.ts +2 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js +42 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.d.ts +139 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +3 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/funnelGeometry.d.ts +77 -0
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js +202 -0
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -0
- package/lib-commonjs/components/FunnelChart/index.d.ts +2 -0
- package/lib-commonjs/components/FunnelChart/index.js +6 -0
- package/lib-commonjs/components/FunnelChart/index.js.map +1 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.d.ts +0 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +1 -15
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.d.ts +4 -0
- package/lib-commonjs/components/LineChart/LineChart.base.js +77 -56
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.d.ts +6 -0
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-commonjs/index.d.ts +2 -0
- package/lib-commonjs/index.js +3 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/IDataPoint.d.ts +1 -1
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +3 -0
- package/lib-commonjs/utilities/utilities.js +17 -1
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +2 -2
- package/src/components/FunnelChart/FunnelChart.types.ts +153 -0
- package/src/components/LineChart/LineChart.types.ts +7 -0
|
@@ -71,6 +71,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
71
71
|
_this_1._yPaddingPrimary = 0;
|
|
72
72
|
_this_1._yPaddingSecondary = 0;
|
|
73
73
|
_this_1._hasMarkersMode = false;
|
|
74
|
+
_this_1._isXAxisDateType = false;
|
|
74
75
|
_this_1.toImage = function (opts) {
|
|
75
76
|
var _a, _b;
|
|
76
77
|
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);
|
|
@@ -417,10 +418,11 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
417
418
|
});
|
|
418
419
|
}
|
|
419
420
|
};
|
|
420
|
-
_this_1._handleHover = function (x, y, lineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale, mouseEvent) {
|
|
421
|
+
_this_1._handleHover = function (x, y, lineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, yScale, legendVal, lineColor, mouseEvent) {
|
|
421
422
|
mouseEvent.persist();
|
|
422
423
|
var formattedData = x instanceof Date ? (0, chart_utilities_1.formatDateToLocaleString)(x, _this_1.props.culture, _this_1.props.useUTC) : x;
|
|
423
424
|
var xVal = x instanceof Date ? x.getTime() : x;
|
|
425
|
+
var yVal = y instanceof Date ? y.getTime() : y;
|
|
424
426
|
var _this = _this_1;
|
|
425
427
|
var found = (0, Utilities_1.find)(_this_1._calloutPoints, function (element) { return element.x === xVal; });
|
|
426
428
|
// if no points need to be called out then don't show vertical line and callout card
|
|
@@ -436,6 +438,9 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
436
438
|
refSelected: "#".concat(circleId),
|
|
437
439
|
hoverXValue: xAxisCalloutData ? xAxisCalloutData : '' + formattedData,
|
|
438
440
|
YValueHover: found.values,
|
|
441
|
+
YValue: yVal,
|
|
442
|
+
legendVal: legendVal,
|
|
443
|
+
lineColor: lineColor,
|
|
439
444
|
stackCalloutProps: found,
|
|
440
445
|
dataPointCalloutProps: found,
|
|
441
446
|
activePoint: circleId,
|
|
@@ -598,17 +603,14 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
598
603
|
};
|
|
599
604
|
_this_1._getDomainNRangeValuesOfDateWithPadding = function (points, margins, width, isRTL, tickValues, chartType, barWidth) {
|
|
600
605
|
if (tickValues === void 0) { tickValues = []; }
|
|
601
|
-
|
|
602
|
-
var lDate;
|
|
603
|
-
sDate = (0, d3_array_2.min)(points, function (point) {
|
|
604
|
-
return (0, d3_array_2.min)(point.data, function (item) { return item.x; });
|
|
605
|
-
});
|
|
606
|
-
lDate = (0, d3_array_2.max)(points, function (point) {
|
|
607
|
-
return (0, d3_array_2.max)(point.data, function (item) { return item.x; });
|
|
608
|
-
});
|
|
606
|
+
_this_1._setXMinMaxValues(points);
|
|
609
607
|
// Include tickValues if present
|
|
610
|
-
sDate =
|
|
611
|
-
|
|
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);
|
|
612
614
|
// Calculate time-based padding (e.g. 10% of the date range)
|
|
613
615
|
var dateRange = lDate.getTime() - sDate.getTime();
|
|
614
616
|
var datePadding = _this_1._hasMarkersMode ? dateRange * 0.1 : 0;
|
|
@@ -631,14 +633,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
631
633
|
};
|
|
632
634
|
};
|
|
633
635
|
_this_1._getDomainNRangeValuesWithPadding = function (points, margins, width, isRTL) {
|
|
634
|
-
_this_1.
|
|
635
|
-
return (0, d3_array_2.min)(point.data, function (item) { return item.x; });
|
|
636
|
-
});
|
|
637
|
-
_this_1._xMax = (0, d3_array_2.max)(points, function (point) {
|
|
638
|
-
return (0, d3_array_2.max)(point.data, function (item) {
|
|
639
|
-
return item.x;
|
|
640
|
-
});
|
|
641
|
-
});
|
|
636
|
+
_this_1._setXMinMaxValues(points);
|
|
642
637
|
if (_this_1._hasMarkersMode) {
|
|
643
638
|
_this_1._xPadding = (_this_1._xMax - _this_1._xMin) * 0.1;
|
|
644
639
|
}
|
|
@@ -662,11 +657,22 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
662
657
|
var _a = _this_1.props.data, chartTitle = _a.chartTitle, lineChartData = _a.lineChartData;
|
|
663
658
|
return (chartTitle ? "".concat(chartTitle, ". ") : '') + "Line chart with ".concat((lineChartData === null || lineChartData === void 0 ? void 0 : lineChartData.length) || 0, " lines. ");
|
|
664
659
|
};
|
|
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
|
+
};
|
|
665
669
|
(0, Utilities_1.initializeComponentRef)(_this_1);
|
|
666
670
|
_this_1.state = {
|
|
667
671
|
hoverXValue: '',
|
|
668
672
|
activeLegend: '',
|
|
669
673
|
YValueHover: [],
|
|
674
|
+
YValue: '',
|
|
675
|
+
legendVal: '',
|
|
670
676
|
refSelected: '',
|
|
671
677
|
selectedLegend: (_b = (_a = props.legendProps) === null || _a === void 0 ? void 0 : _a.selectedLegend) !== null && _b !== void 0 ? _b : '',
|
|
672
678
|
isCalloutVisible: false,
|
|
@@ -723,7 +729,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
723
729
|
var _this_1 = this;
|
|
724
730
|
var _a = this.props, tickValues = _a.tickValues, tickFormat = _a.tickFormat, eventAnnotationProps = _a.eventAnnotationProps, legendProps = _a.legendProps, data = _a.data;
|
|
725
731
|
this._points = this._injectIndexPropertyInLineChartData(data.lineChartData);
|
|
726
|
-
|
|
732
|
+
this._isXAxisDateType = (0, index_3.getXAxisType)(this._points);
|
|
727
733
|
var points = this._points;
|
|
728
734
|
if (legendProps && !!legendProps.canSelectMultipleLegends) {
|
|
729
735
|
points = this.state.selectedLegendPoints.length >= 1 ? this.state.selectedLegendPoints : this._points;
|
|
@@ -736,14 +742,14 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
736
742
|
if (!this.props.hideLegend) {
|
|
737
743
|
legendBars = this._createLegendsMemoized(this._points);
|
|
738
744
|
}
|
|
739
|
-
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
|
|
745
|
+
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
|
|
740
746
|
? this.props.getCalloutDescriptionMessage(this.state.stackCalloutProps)
|
|
741
747
|
: undefined, 'data-is-focusable': true, xAxisCalloutAccessibilityData: this.state.xAxisCalloutAccessibilityData }, this.props.calloutProps);
|
|
742
748
|
var tickParams = {
|
|
743
749
|
tickValues: tickValues,
|
|
744
750
|
tickFormat: tickFormat,
|
|
745
751
|
};
|
|
746
|
-
return !this._isChartEmpty() ? (React.createElement(index_2.CartesianChart, tslib_1.__assign({}, this.props, { chartTitle: this._getChartTitle(), points: points, chartType: index_3.ChartTypes.LineChart,
|
|
752
|
+
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,
|
|
747
753
|
/* eslint-disable react/jsx-no-bind */
|
|
748
754
|
// eslint-disable-next-line react/no-children-prop
|
|
749
755
|
children: function (props) {
|
|
@@ -846,7 +852,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
846
852
|
};
|
|
847
853
|
LineChartBase.prototype._createLines = function (xElement, containerHeight) {
|
|
848
854
|
var _this_1 = this;
|
|
849
|
-
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;
|
|
855
|
+
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;
|
|
850
856
|
var lines = [];
|
|
851
857
|
if (this.state.isSelectedLegend) {
|
|
852
858
|
this._points = this.state.selectedLegendPoints;
|
|
@@ -875,21 +881,27 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
875
881
|
var yPadding = this_1._points[i].useSecondaryYScale && this_1._yScaleSecondary ? this_1._yPaddingSecondary : this_1._yPaddingPrimary;
|
|
876
882
|
var extraMaxPixels = this_1._hasMarkersMode ? this_1._getRangeForScatterMarkerSize(yScale, yPadding) : 0;
|
|
877
883
|
if (this_1._points[i].data.length === 1) {
|
|
878
|
-
var
|
|
884
|
+
var _17 = this_1._points[i].data[0], x1_1 = _17.x, y1 = _17.y, xAxisCalloutData_1 = _17.xAxisCalloutData, xAxisCalloutAccessibilityData_1 = _17.xAxisCalloutAccessibilityData;
|
|
879
885
|
var circleId_1 = "".concat(this_1._circleId, "_").concat(i);
|
|
880
886
|
var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
|
|
881
887
|
var currentMarkerSize = this_1._points[i].data[0].markerSize;
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
888
|
+
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');
|
|
889
|
+
var text = this_1._points[i].data[0].text;
|
|
890
|
+
pointsForLine.push(React.createElement(React.Fragment, { key: "".concat(circleId_1, "_fragment") },
|
|
891
|
+
React.createElement("circle", tslib_1.__assign({ id: circleId_1, key: circleId_1, r: currentMarkerSize
|
|
892
|
+
? (currentMarkerSize * extraMaxPixels) / maxMarkerSize
|
|
893
|
+
: activePoint === circleId_1
|
|
894
|
+
? 5.5
|
|
895
|
+
: 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) {
|
|
896
|
+
_this_1._refCallback(e, circleId_1);
|
|
897
|
+
}, 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))),
|
|
898
|
+
supportsTextMode && text && (React.createElement("text", { key: "".concat(circleId_1, "-label"), x: this_1._xAxisScale(x1_1), y: yScale(y1) +
|
|
899
|
+
Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 3.5, 4) +
|
|
900
|
+
12, className: classNames.markerLabel, opacity: isLegendSelected ? 1 : 0.1 }, text))));
|
|
889
901
|
}
|
|
890
902
|
var gapIndex = 0;
|
|
891
|
-
var gaps = (
|
|
892
|
-
var lineCurve = (
|
|
903
|
+
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 : [];
|
|
904
|
+
var lineCurve = (_e = this_1._points[i].lineOptions) === null || _e === void 0 ? void 0 : _e.curve;
|
|
893
905
|
// Use path rendering technique for larger datasets to optimize performance.
|
|
894
906
|
if ((this_1.props.optimizeLargeData || lineCurve) && this_1._points[i].data.length > 1) {
|
|
895
907
|
var line = (0, d3_shape_1.line)()
|
|
@@ -900,7 +912,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
900
912
|
.curve((0, index_3.getCurveFactory)(lineCurve));
|
|
901
913
|
var lineId = "".concat(this_1._lineId, "_").concat(i);
|
|
902
914
|
var borderId = "".concat(this_1._borderId, "_").concat(i);
|
|
903
|
-
var strokeWidth = ((
|
|
915
|
+
var strokeWidth = ((_f = this_1._points[i].lineOptions) === null || _f === void 0 ? void 0 : _f.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
|
|
904
916
|
var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
|
|
905
917
|
var lineData = [];
|
|
906
918
|
for (var k = 0; k < this_1._points[i].data.length; k++) {
|
|
@@ -912,16 +924,16 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
912
924
|
]);
|
|
913
925
|
}
|
|
914
926
|
if (isLegendSelected) {
|
|
915
|
-
var lineBorderWidth = ((
|
|
927
|
+
var lineBorderWidth = ((_g = this_1._points[i].lineOptions) === null || _g === void 0 ? void 0 : _g.lineBorderWidth)
|
|
916
928
|
? Number.parseFloat(this_1._points[i].lineOptions.lineBorderWidth.toString())
|
|
917
929
|
: 0;
|
|
918
930
|
if (lineBorderWidth > 0) {
|
|
919
|
-
bordersForLine.push(React.createElement("path", { id: borderId, key: borderId, d: line(lineData), fill: "transparent", strokeLinecap: (
|
|
931
|
+
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 }));
|
|
920
932
|
}
|
|
921
|
-
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: (
|
|
933
|
+
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 })));
|
|
922
934
|
}
|
|
923
935
|
else {
|
|
924
|
-
linesForLine.push(React.createElement("path", { id: lineId, key: lineId, d: line(lineData), fill: "transparent", "data-is-focusable": false, stroke: lineColor, strokeWidth: strokeWidth, strokeLinecap: (
|
|
936
|
+
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 }));
|
|
925
937
|
}
|
|
926
938
|
var isPointHighlighted = this_1.state.activeLine !== null && this_1.state.activeLine === i;
|
|
927
939
|
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 }));
|
|
@@ -934,54 +946,62 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
934
946
|
var lineId = "".concat(this_1._lineId, "_").concat(i, "_").concat(j);
|
|
935
947
|
var borderId = "".concat(this_1._borderId, "_").concat(i, "_").concat(j);
|
|
936
948
|
var circleId = "".concat(this_1._circleId, "_").concat(i, "_").concat(j);
|
|
937
|
-
var
|
|
938
|
-
var
|
|
949
|
+
var _18 = this_1._points[i].data[j - 1], x1 = _18.x, y1 = _18.y, xAxisCalloutData = _18.xAxisCalloutData, xAxisCalloutAccessibilityData = _18.xAxisCalloutAccessibilityData;
|
|
950
|
+
var _19 = this_1._points[i].data[j], x2 = _19.x, y2 = _19.y;
|
|
939
951
|
var path = this_1._getPath(this_1._xAxisScale(x1), yScale(y1), circleId, j, false, this_1._points[i].index);
|
|
940
|
-
var strokeWidth = ((
|
|
952
|
+
var strokeWidth = ((_s = this_1._points[i].lineOptions) === null || _s === void 0 ? void 0 : _s.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
|
|
941
953
|
var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
|
|
942
954
|
var currentPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== circleId;
|
|
955
|
+
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');
|
|
956
|
+
var text = this_1._points[i].data[j - 1].text;
|
|
943
957
|
var currentMarkerSize = this_1._points[i].data[j - 1].markerSize;
|
|
944
|
-
pointsForLine.push(((
|
|
945
|
-
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 () {
|
|
958
|
+
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,
|
|
959
|
+
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 () {
|
|
946
960
|
return _this_1._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData);
|
|
947
|
-
}, 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": (
|
|
948
|
-
|
|
961
|
+
}, 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) })),
|
|
962
|
+
supportsTextMode && text && (React.createElement("text", { key: "".concat(circleId, "-label"), x: this_1._xAxisScale(x1), y: yScale(y1) +
|
|
963
|
+
Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, 4) +
|
|
964
|
+
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) }))));
|
|
949
965
|
if (j + 1 === this_1._points[i].data.length) {
|
|
950
966
|
// If this is last point of the line segment.
|
|
951
967
|
var lastCircleId_1 = "".concat(circleId).concat(j, "L");
|
|
952
968
|
var hiddenHoverCircleId = "".concat(circleId).concat(j, "D");
|
|
953
969
|
var lastPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== lastCircleId_1;
|
|
954
970
|
path = this_1._getPath(this_1._xAxisScale(x2), yScale(y2), lastCircleId_1, j, true, this_1._points[i].index);
|
|
955
|
-
var
|
|
971
|
+
var _20 = this_1._points[i].data[j], lastCirlceXCallout_1 = _20.xAxisCalloutData, lastCirlceXCalloutAccessibilityData_1 = _20.xAxisCalloutAccessibilityData;
|
|
956
972
|
currentMarkerSize = this_1._points[i].data[j].markerSize;
|
|
973
|
+
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');
|
|
974
|
+
var lastText = this_1._points[i].data[j].text;
|
|
957
975
|
pointsForLine.push(React.createElement(React.Fragment, { key: "".concat(lastCircleId_1, "_container") },
|
|
958
|
-
((
|
|
959
|
-
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 () {
|
|
976
|
+
((_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,
|
|
977
|
+
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 () {
|
|
960
978
|
return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
|
|
961
|
-
}, 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": (
|
|
962
|
-
|
|
979
|
+
}, 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) })),
|
|
980
|
+
lastSupportsTextMode && lastText && (React.createElement("text", { key: "".concat(lastCircleId_1, "-label"), x: this_1._xAxisScale(x2), y: yScale(y2) +
|
|
981
|
+
Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, 4) +
|
|
982
|
+
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 () {
|
|
963
983
|
return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
|
|
964
984
|
}, 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) }))),
|
|
965
|
-
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 })));
|
|
985
|
+
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 })));
|
|
966
986
|
}
|
|
967
|
-
if (!this_1._hasMarkersMode || ((
|
|
987
|
+
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'))) {
|
|
968
988
|
if (isLegendSelected) {
|
|
969
989
|
// don't draw line if it is in a gap
|
|
970
990
|
if (!isInGap) {
|
|
971
|
-
var lineBorderWidth = ((
|
|
991
|
+
var lineBorderWidth = ((_5 = this_1._points[i].lineOptions) === null || _5 === void 0 ? void 0 : _5.lineBorderWidth)
|
|
972
992
|
? Number.parseFloat(this_1._points[i].lineOptions.lineBorderWidth.toString())
|
|
973
993
|
: 0;
|
|
974
994
|
if (lineBorderWidth > 0) {
|
|
975
|
-
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: (
|
|
995
|
+
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 }));
|
|
976
996
|
}
|
|
977
997
|
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) {
|
|
978
998
|
_this_1._refCallback(e, lineId);
|
|
979
|
-
}, 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: (
|
|
999
|
+
}, 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))));
|
|
980
1000
|
}
|
|
981
1001
|
}
|
|
982
1002
|
else {
|
|
983
1003
|
if (!isInGap) {
|
|
984
|
-
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: (
|
|
1004
|
+
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 }));
|
|
985
1005
|
}
|
|
986
1006
|
}
|
|
987
1007
|
}
|
|
@@ -1036,6 +1056,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
1036
1056
|
LineChartBase.defaultProps = {
|
|
1037
1057
|
enableReflow: true,
|
|
1038
1058
|
useUTC: true,
|
|
1059
|
+
isCalloutForStack: false,
|
|
1039
1060
|
};
|
|
1040
1061
|
return LineChartBase;
|
|
1041
1062
|
}(React.Component));
|