@fluentui/react-charting 5.24.2 → 5.24.3
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 +34 -1
- package/CHANGELOG.md +14 -2
- package/dist/react-charting.d.ts +170 -37
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +58 -11
- package/lib/ScatterChart.d.ts +1 -0
- package/lib/ScatterChart.js +2 -0
- package/lib/ScatterChart.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.base.js +45 -9
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.d.ts +21 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +157 -78
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +252 -62
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib/components/ScatterChart/ScatterChart.base.js +453 -0
- package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib/components/ScatterChart/ScatterChart.js +10 -0
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib/components/ScatterChart/ScatterChart.styles.js +7 -0
- package/lib/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.types.d.ts +42 -0
- package/lib/components/ScatterChart/ScatterChart.types.js +2 -0
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib/components/ScatterChart/index.d.ts +2 -0
- package/lib/components/ScatterChart/index.js +3 -0
- package/lib/components/ScatterChart/index.js.map +1 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/IDataPoint.d.ts +73 -11
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/utilities/SVGTooltipText.d.ts +4 -0
- package/lib/utilities/SVGTooltipText.js +1 -2
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/utilities.d.ts +27 -3
- package/lib/utilities/utilities.js +102 -1
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/ScatterChart.d.ts +1 -0
- package/lib-amd/ScatterChart.js +6 -0
- package/lib-amd/ScatterChart.js.map +1 -0
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +45 -9
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +21 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +155 -78
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +264 -71
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib-amd/components/ScatterChart/ScatterChart.base.js +447 -0
- package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib-amd/components/ScatterChart/ScatterChart.js +12 -0
- package/lib-amd/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.js +12 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.d.ts +42 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.js +5 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib-amd/components/ScatterChart/index.d.ts +2 -0
- package/lib-amd/components/ScatterChart/index.js +7 -0
- package/lib-amd/components/ScatterChart/index.js.map +1 -0
- package/lib-amd/index.d.ts +3 -1
- package/lib-amd/index.js +3 -2
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/types/IDataPoint.d.ts +73 -11
- package/lib-amd/types/IDataPoint.js.map +1 -1
- package/lib-amd/utilities/SVGTooltipText.d.ts +4 -0
- package/lib-amd/utilities/SVGTooltipText.js +1 -2
- package/lib-amd/utilities/SVGTooltipText.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +27 -3
- package/lib-amd/utilities/utilities.js +106 -2
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/ScatterChart.d.ts +1 -0
- package/lib-commonjs/ScatterChart.js +5 -0
- package/lib-commonjs/ScatterChart.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +45 -9
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +21 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +157 -78
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +263 -71
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +456 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +13 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js +11 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.d.ts +42 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +3 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/index.d.ts +2 -0
- package/lib-commonjs/components/ScatterChart/index.js +6 -0
- package/lib-commonjs/components/ScatterChart/index.js.map +1 -0
- package/lib-commonjs/index.d.ts +3 -1
- package/lib-commonjs/index.js +3 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/IDataPoint.d.ts +73 -11
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.d.ts +4 -0
- package/lib-commonjs/utilities/SVGTooltipText.js +1 -2
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +27 -3
- package/lib-commonjs/utilities/utilities.js +106 -2
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +2 -2
- package/src/components/CommonComponents/CartesianChart.types.ts +25 -1
- package/src/components/ScatterChart/ScatterChart.types.ts +61 -0
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "react", "d3-selection", "../Legends/index", "d3-array", "../../utilities/index", "../../index", "../../utilities/index", "@fluentui/react", "../../utilities/image-export-utils", "@fluentui/chart-utilities"], function (require, exports, tslib_1, React, d3_selection_1, index_1, d3_array_1, index_2, index_3, index_4, react_1, image_export_utils_1, chart_utilities_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ScatterChartBase = void 0;
|
|
5
|
+
var getClassNames = (0, react_1.classNamesFunction)();
|
|
6
|
+
// Create a ScatterChart variant which uses these default styles and this styled subcomponent.
|
|
7
|
+
/**
|
|
8
|
+
* ScatterChart component
|
|
9
|
+
* {@docCategory ScatterChart}
|
|
10
|
+
*/
|
|
11
|
+
exports.ScatterChartBase = React.forwardRef(function (props, forwardedRef) {
|
|
12
|
+
var _circleId = React.useMemo(function () { return (0, react_1.getId)('circle'); }, []);
|
|
13
|
+
var _seriesId = React.useMemo(function () { return (0, react_1.getId)('seriesID'); }, []);
|
|
14
|
+
var _verticalLine = React.useMemo(function () { return (0, react_1.getId)('verticalLine'); }, []);
|
|
15
|
+
var _tooltipId = React.useMemo(function () { return (0, react_1.getId)('ScatterChartTooltipId_'); }, []);
|
|
16
|
+
var _firstRenderOptimization = true;
|
|
17
|
+
var _emptyChartId = React.useMemo(function () { return (0, react_1.getId)('_ScatterChart_empty'); }, []);
|
|
18
|
+
var _points = React.useRef(_injectIndexPropertyInScatterChartData(props.data.scatterChartData));
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
+
var _calloutPoints = React.useMemo(function () { return (0, index_4.calloutData)(_points.current) || []; }, [_points]);
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
+
var _xAxisScale = React.useRef('');
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
|
+
var _yAxisScale = React.useRef('');
|
|
25
|
+
var _uniqueCallOutID = React.useRef(null);
|
|
26
|
+
var _refArray = React.useMemo(function () { return []; }, []);
|
|
27
|
+
var margins = React.useRef(null);
|
|
28
|
+
var renderSeries = React.useRef([]);
|
|
29
|
+
var _xAxisLabels = [];
|
|
30
|
+
var _xAxisCalloutAccessibilityData = {};
|
|
31
|
+
var _xBandwidth = React.useRef(0);
|
|
32
|
+
var cartesianChartRef = React.useRef(null);
|
|
33
|
+
var legendsRef = React.useRef(null);
|
|
34
|
+
var _a = React.useState(''), hoverXValue = _a[0], setHoverXValue = _a[1];
|
|
35
|
+
var _b = React.useState(''), activeLegend = _b[0], setActiveLegend = _b[1];
|
|
36
|
+
var _c = React.useState([]), YValueHover = _c[0], setYValueHover = _c[1];
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
|
+
var _d = React.useState([]), selectedLegendPoints = _d[0], setSelectedLegendPoints = _d[1];
|
|
39
|
+
var _e = React.useState(false), isSelectedLegend = _e[0], setIsSelectedLegend = _e[1];
|
|
40
|
+
var _f = React.useState(''), activePoint = _f[0], setActivePoint = _f[1];
|
|
41
|
+
var _g = React.useState(), stackCalloutProps = _g[0], setStackCalloutProps = _g[1];
|
|
42
|
+
var _h = React.useState(false), isCalloutVisible = _h[0], setCalloutVisible = _h[1];
|
|
43
|
+
var _j = React.useState([]), selectedLegends = _j[0], setSelectedLegends = _j[1];
|
|
44
|
+
var _k = React.useState(''), refSelected = _k[0], setRefSelected = _k[1];
|
|
45
|
+
var prevPropsRef = React.useRef(null);
|
|
46
|
+
React.useEffect(function () {
|
|
47
|
+
var _a, _b, _c;
|
|
48
|
+
if (prevPropsRef.current) {
|
|
49
|
+
var prevProps = prevPropsRef.current;
|
|
50
|
+
if (!(0, index_2.areArraysEqual)((_a = prevProps.legendProps) === null || _a === void 0 ? void 0 : _a.selectedLegends, (_b = props.legendProps) === null || _b === void 0 ? void 0 : _b.selectedLegends)) {
|
|
51
|
+
setSelectedLegends(((_c = props.legendProps) === null || _c === void 0 ? void 0 : _c.selectedLegends) || []);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
prevPropsRef.current = props;
|
|
55
|
+
}, [props]);
|
|
56
|
+
React.useImperativeHandle(props.componentRef, function () {
|
|
57
|
+
var _a, _b;
|
|
58
|
+
return ({
|
|
59
|
+
chartContainer: (_b = (_a = cartesianChartRef.current) === null || _a === void 0 ? void 0 : _a.chartContainer) !== null && _b !== void 0 ? _b : null,
|
|
60
|
+
toImage: function (opts) {
|
|
61
|
+
var _a, _b;
|
|
62
|
+
return (0, image_export_utils_1.toImage)((_a = cartesianChartRef.current) === null || _a === void 0 ? void 0 : _a.chartContainer, (_b = legendsRef.current) === null || _b === void 0 ? void 0 : _b.toSVG, (0, react_1.getRTL)(), opts);
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}, []);
|
|
66
|
+
var _xAxisType = props.data.scatterChartData &&
|
|
67
|
+
props.data.scatterChartData.length > 0 &&
|
|
68
|
+
props.data.scatterChartData[0].data &&
|
|
69
|
+
props.data.scatterChartData[0].data.length > 0
|
|
70
|
+
? (0, index_4.getTypeOfAxis)(props.data.scatterChartData[0].data[0].x, true)
|
|
71
|
+
: index_4.XAxisTypes.StringAxis;
|
|
72
|
+
var pointsRef = React.useRef([]);
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
74
|
+
var calloutPointsRef = React.useRef([]);
|
|
75
|
+
React.useEffect(function () {
|
|
76
|
+
/** note that height and width are not used to resize or set as dimesions of the chart,
|
|
77
|
+
* fitParentContainer is responisble for setting the height and width or resizing of the svg/chart
|
|
78
|
+
*/
|
|
79
|
+
if (_points.current !== _injectIndexPropertyInScatterChartData(props.data.scatterChartData) ||
|
|
80
|
+
props.data !== _points.current) {
|
|
81
|
+
pointsRef.current = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);
|
|
82
|
+
calloutPointsRef.current = (0, index_4.calloutData)(pointsRef.current);
|
|
83
|
+
}
|
|
84
|
+
}, [props.height, props.width, props.data, _points]);
|
|
85
|
+
function _injectIndexPropertyInScatterChartData(scatterChartData) {
|
|
86
|
+
return scatterChartData
|
|
87
|
+
? scatterChartData.map(function (item, index) {
|
|
88
|
+
var color;
|
|
89
|
+
if (typeof item.color === 'undefined') {
|
|
90
|
+
color = (0, index_4.getNextColor)(index, 0);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
color = (0, index_4.getColorFromToken)(item.color);
|
|
94
|
+
}
|
|
95
|
+
return tslib_1.__assign(tslib_1.__assign({}, item), { index: -1, color: color });
|
|
96
|
+
})
|
|
97
|
+
: [];
|
|
98
|
+
}
|
|
99
|
+
var _getMargins = React.useCallback(function (_margins) {
|
|
100
|
+
margins.current = _margins;
|
|
101
|
+
}, []);
|
|
102
|
+
function _onHoverCardHide() {
|
|
103
|
+
setSelectedLegendPoints([]);
|
|
104
|
+
setIsSelectedLegend(false);
|
|
105
|
+
}
|
|
106
|
+
function _createLegends(data) {
|
|
107
|
+
var legendProps = props.legendProps;
|
|
108
|
+
var isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);
|
|
109
|
+
var legendDataItems = data.map(function (point) {
|
|
110
|
+
var color = point.color;
|
|
111
|
+
// mapping data to the format Legends component needs
|
|
112
|
+
var legend = tslib_1.__assign({ title: point.legend, color: color, onMouseOutAction: function () {
|
|
113
|
+
setActiveLegend('');
|
|
114
|
+
}, hoverAction: function () {
|
|
115
|
+
_handleChartMouseLeave();
|
|
116
|
+
setActiveLegend(point.legend);
|
|
117
|
+
} }, (point.legendShape && {
|
|
118
|
+
shape: point.legendShape,
|
|
119
|
+
}));
|
|
120
|
+
return legend;
|
|
121
|
+
});
|
|
122
|
+
return (React.createElement(index_1.Legends, tslib_1.__assign({ legends: tslib_1.__spreadArray([], legendDataItems, true), enabledWrapLines: props.enabledLegendsWrapLines, overflowProps: props.legendsOverflowProps, focusZonePropsInHoverCard: props.focusZonePropsForLegendsInHoverCard, overflowText: props.legendsOverflowText }, (isLegendMultiSelectEnabled && { onLegendHoverCardLeave: _onHoverCardHide }), { onChange: _onLegendSelectionChange }, props.legendProps)));
|
|
123
|
+
}
|
|
124
|
+
function _onLegendSelectionChange(legendsSelected, event, currentLegend) {
|
|
125
|
+
var _a, _b;
|
|
126
|
+
if ((_a = props.legendProps) === null || _a === void 0 ? void 0 : _a.canSelectMultipleLegends) {
|
|
127
|
+
setSelectedLegends(legendsSelected);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
setSelectedLegends(legendsSelected.slice(-1));
|
|
131
|
+
}
|
|
132
|
+
if ((_b = props.legendProps) === null || _b === void 0 ? void 0 : _b.onChange) {
|
|
133
|
+
props.legendProps.onChange(legendsSelected, event, currentLegend);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
var _getPointFill = React.useCallback(function (lineColor, pointId) {
|
|
137
|
+
var theme = props.theme;
|
|
138
|
+
if (activePoint === pointId) {
|
|
139
|
+
return theme.semanticColors.bodyBackground;
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
return lineColor;
|
|
143
|
+
}
|
|
144
|
+
}, [activePoint, props]);
|
|
145
|
+
var getDomainNRangeValuesScatterChart = React.useCallback(function (
|
|
146
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
147
|
+
points, domainMargins, width, _chartType, isRTL, xAxisType, _barWidth, tickValues) {
|
|
148
|
+
if (xAxisType === index_4.XAxisTypes.NumericAxis) {
|
|
149
|
+
return (0, index_2.domainRangeOfNumericForScatterChart)(points, domainMargins, width, isRTL);
|
|
150
|
+
}
|
|
151
|
+
else if (xAxisType === index_4.XAxisTypes.DateAxis) {
|
|
152
|
+
return (0, index_2.domainRangeOfDateForScatterChart)(points, domainMargins, width, isRTL, tickValues);
|
|
153
|
+
}
|
|
154
|
+
// String Axis type
|
|
155
|
+
return (0, index_2.domainRangeOfXStringAxis)(domainMargins, width, isRTL);
|
|
156
|
+
}, []);
|
|
157
|
+
var _handleFocus = React.useCallback(function (seriesId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData) {
|
|
158
|
+
_uniqueCallOutID.current = circleId;
|
|
159
|
+
var formattedData = x instanceof Date ? (0, chart_utilities_1.formatDateToLocaleString)(x, props.culture, props.useUTC) : x;
|
|
160
|
+
var xVal = x instanceof Date ? x.getTime() : x;
|
|
161
|
+
var found = (0, react_1.find)(_calloutPoints, function (element) { return element.x === xVal; });
|
|
162
|
+
// if no points need to be called out then don't show vertical line and callout card
|
|
163
|
+
if (found) {
|
|
164
|
+
(0, d3_selection_1.select)("#".concat(_verticalLine))
|
|
165
|
+
.attr('transform', function () { var _a; return "translate(".concat(((_a = _xAxisScale.current) === null || _a === void 0 ? void 0 : _a.call(_xAxisScale, x)) + _xBandwidth.current, ", 0)"); })
|
|
166
|
+
.attr('visibility', 'visibility');
|
|
167
|
+
_refArray.forEach(function (obj) {
|
|
168
|
+
if (obj.index === seriesId) {
|
|
169
|
+
setCalloutVisible(true);
|
|
170
|
+
xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);
|
|
171
|
+
setRefSelected("#".concat(circleId));
|
|
172
|
+
setYValueHover(found.values);
|
|
173
|
+
setActivePoint(circleId);
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
setActivePoint(circleId);
|
|
179
|
+
}
|
|
180
|
+
}, [_verticalLine, _xAxisScale, _xBandwidth, _calloutPoints, _refArray, props.culture, props.useUTC]);
|
|
181
|
+
var _handleHover = React.useCallback(function (x, y, lineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, mouseEvent) {
|
|
182
|
+
var _a;
|
|
183
|
+
mouseEvent === null || mouseEvent === void 0 ? void 0 : mouseEvent.persist();
|
|
184
|
+
var formattedData = x instanceof Date ? (0, chart_utilities_1.formatDateToLocaleString)(x, props.culture, props.useUTC) : x;
|
|
185
|
+
var xVal = x instanceof Date ? x.getTime() : x;
|
|
186
|
+
var found = (0, react_1.find)(_calloutPoints, function (element) { return element.x === xVal; });
|
|
187
|
+
// if no points need to be called out then don't show vertical line and callout card
|
|
188
|
+
if (found) {
|
|
189
|
+
(0, d3_selection_1.select)("#".concat(_verticalLine))
|
|
190
|
+
.attr('transform', function () { var _a, _b; return "translate(".concat(((_a = _xAxisScale.current) === null || _a === void 0 ? void 0 : _a.call(_xAxisScale, x)) + _xBandwidth.current, ", ").concat((_b = _yAxisScale.current) === null || _b === void 0 ? void 0 : _b.call(_yAxisScale, y), ")"); })
|
|
191
|
+
.attr('visibility', 'visibility')
|
|
192
|
+
.attr('y2', "".concat(lineHeight - ((_a = _yAxisScale.current) === null || _a === void 0 ? void 0 : _a.call(_yAxisScale, y))));
|
|
193
|
+
if (_uniqueCallOutID.current !== circleId) {
|
|
194
|
+
_uniqueCallOutID.current = circleId;
|
|
195
|
+
setCalloutVisible(true);
|
|
196
|
+
xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);
|
|
197
|
+
setRefSelected("#".concat(circleId));
|
|
198
|
+
setYValueHover(found.values);
|
|
199
|
+
setStackCalloutProps(found);
|
|
200
|
+
setActivePoint(circleId);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
setActivePoint(circleId);
|
|
205
|
+
}
|
|
206
|
+
}, [_verticalLine, _xAxisScale, _xBandwidth, _calloutPoints, props.culture, props.useUTC]);
|
|
207
|
+
var _handleMouseOut = React.useCallback(function () {
|
|
208
|
+
(0, d3_selection_1.select)("#".concat(_verticalLine)).attr('visibility', 'hidden');
|
|
209
|
+
}, [_verticalLine]);
|
|
210
|
+
var _handleChartMouseLeave = React.useCallback(function () {
|
|
211
|
+
_uniqueCallOutID.current = null;
|
|
212
|
+
setActivePoint('');
|
|
213
|
+
if (isCalloutVisible) {
|
|
214
|
+
setCalloutVisible(false);
|
|
215
|
+
}
|
|
216
|
+
}, [_uniqueCallOutID, isCalloutVisible, setActivePoint, setCalloutVisible]);
|
|
217
|
+
/**
|
|
218
|
+
* This function checks if none of the legends is selected or hovered.*/
|
|
219
|
+
var _noLegendHighlighted = React.useCallback(function () {
|
|
220
|
+
return selectedLegends.length === 0;
|
|
221
|
+
}, [selectedLegends]);
|
|
222
|
+
var _getHighlightedLegend = React.useCallback(function () {
|
|
223
|
+
return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];
|
|
224
|
+
}, [selectedLegends, activeLegend]);
|
|
225
|
+
/**
|
|
226
|
+
* This function checks if the given legend is highlighted or not.
|
|
227
|
+
* A legend can be highlighted in 2 ways:
|
|
228
|
+
* 1. selection: if the user clicks on it
|
|
229
|
+
* 2. hovering: if there is no selected legend and the user hovers over it*/
|
|
230
|
+
var _legendHighlighted = React.useCallback(function (legend) {
|
|
231
|
+
return _getHighlightedLegend().includes(legend);
|
|
232
|
+
}, [_getHighlightedLegend]);
|
|
233
|
+
var _getAriaLabel = React.useCallback(function (seriesIndex, pointIndex) {
|
|
234
|
+
var _a, _b;
|
|
235
|
+
var series = (_a = _points.current) === null || _a === void 0 ? void 0 : _a[seriesIndex];
|
|
236
|
+
var point = series.data[pointIndex];
|
|
237
|
+
var formattedDate = point.x instanceof Date ? (0, chart_utilities_1.formatDateToLocaleString)(point.x, props.culture, props.useUTC) : point.x;
|
|
238
|
+
var xValue = point.xAxisCalloutData || formattedDate;
|
|
239
|
+
var legend = series.legend;
|
|
240
|
+
var yValue = point.yAxisCalloutData || point.y;
|
|
241
|
+
return ((_b = point.callOutAccessibilityData) === null || _b === void 0 ? void 0 : _b.ariaLabel) || "".concat(xValue, ". ").concat(legend, ", ").concat(yValue, ".");
|
|
242
|
+
}, [_points, props.culture, props.useUTC]);
|
|
243
|
+
var _createPlot = React.useCallback(function (xElement, containerHeight) {
|
|
244
|
+
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;
|
|
245
|
+
var series = [];
|
|
246
|
+
if (isSelectedLegend) {
|
|
247
|
+
_points.current = selectedLegendPoints;
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
_points.current = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);
|
|
251
|
+
}
|
|
252
|
+
var yMax = (0, d3_array_1.max)(_points.current, function (point) {
|
|
253
|
+
return (0, d3_array_1.max)(point.data, function (item) { return item.y; });
|
|
254
|
+
});
|
|
255
|
+
var yMin = (0, d3_array_1.min)(_points.current, function (point) {
|
|
256
|
+
return (0, d3_array_1.min)(point.data, function (item) { return item.y; });
|
|
257
|
+
});
|
|
258
|
+
var yPadding = (yMax - yMin) * 0.1;
|
|
259
|
+
var yPaddingRange = Math.abs(((_a = _yAxisScale.current) === null || _a === void 0 ? void 0 : _a.call(_yAxisScale, yMin + yPadding)) - ((_b = _yAxisScale.current) === null || _b === void 0 ? void 0 : _b.call(_yAxisScale, yMin)));
|
|
260
|
+
var maxMarkerRange = 40;
|
|
261
|
+
var xPaddingRange = 0;
|
|
262
|
+
if (_xAxisType === index_4.XAxisTypes.StringAxis) {
|
|
263
|
+
_xBandwidth.current = ((_c = _xAxisScale.current) === null || _c === void 0 ? void 0 : _c.bandwidth()) / 2;
|
|
264
|
+
xPaddingRange = _xBandwidth.current;
|
|
265
|
+
}
|
|
266
|
+
else if (_xAxisType === index_4.XAxisTypes.DateAxis) {
|
|
267
|
+
var xMin = (0, d3_array_1.min)(_points.current, function (point) {
|
|
268
|
+
return (0, d3_array_1.min)(point.data, function (item) { return item.x; });
|
|
269
|
+
});
|
|
270
|
+
var xMax = (0, d3_array_1.max)(_points.current, function (point) {
|
|
271
|
+
return (0, d3_array_1.max)(point.data, function (item) {
|
|
272
|
+
return item.x;
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
var xPadding = (xMax.getTime() - xMin.getTime()) * 0.1;
|
|
276
|
+
xPaddingRange = Math.abs(((_d = _xAxisScale.current) === null || _d === void 0 ? void 0 : _d.call(_xAxisScale, new Date(xMin.getTime() + xPadding))) - ((_e = _xAxisScale.current) === null || _e === void 0 ? void 0 : _e.call(_xAxisScale, xMin)));
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
var xMin = (0, d3_array_1.min)(_points.current, function (point) {
|
|
280
|
+
return (0, d3_array_1.min)(point.data, function (item) { return item.x; });
|
|
281
|
+
});
|
|
282
|
+
var xMax = (0, d3_array_1.max)(_points.current, function (point) {
|
|
283
|
+
return (0, d3_array_1.max)(point.data, function (item) {
|
|
284
|
+
return item.x;
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
var xPadding = (xMax - xMin) * 0.1;
|
|
288
|
+
xPaddingRange = Math.abs(((_f = _xAxisScale.current) === null || _f === void 0 ? void 0 : _f.call(_xAxisScale, xMin + xPadding)) - ((_g = _xAxisScale.current) === null || _g === void 0 ? void 0 : _g.call(_xAxisScale, xMin)));
|
|
289
|
+
}
|
|
290
|
+
maxMarkerRange = Math.min(maxMarkerRange, Math.min(xPaddingRange, yPaddingRange));
|
|
291
|
+
var maxMarkerSize = (0, d3_array_1.max)(_points.current, function (point) {
|
|
292
|
+
return (0, d3_array_1.max)(point.data, function (item) {
|
|
293
|
+
return item.markerSize;
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
var _loop_1 = function (i) {
|
|
297
|
+
var pointsForSeries = [];
|
|
298
|
+
var legendVal = (_k = (_j = _points.current) === null || _j === void 0 ? void 0 : _j[i]) === null || _k === void 0 ? void 0 : _k.legend;
|
|
299
|
+
var seriesColor = (_m = (_l = _points.current) === null || _l === void 0 ? void 0 : _l[i]) === null || _m === void 0 ? void 0 : _m.color;
|
|
300
|
+
var verticaLineHeight = containerHeight - ((_p = (_o = margins.current) === null || _o === void 0 ? void 0 : _o.bottom) !== null && _p !== void 0 ? _p : 0) + 6;
|
|
301
|
+
var _loop_2 = function (j) {
|
|
302
|
+
var seriesId = "".concat(_seriesId, "_").concat(i, "_").concat(j);
|
|
303
|
+
var circleId = "".concat(_circleId, "_").concat(i, "_").concat(j);
|
|
304
|
+
var _10 = (_u = (_t = _points.current) === null || _t === void 0 ? void 0 : _t[i]) === null || _u === void 0 ? void 0 : _u.data[j], x = _10.x, y = _10.y, xAxisCalloutData = _10.xAxisCalloutData, xAxisCalloutAccessibilityData = _10.xAxisCalloutAccessibilityData;
|
|
305
|
+
var circleRadius = 3.5;
|
|
306
|
+
var pointMarkerSize = ((_w = (_v = _points.current) === null || _v === void 0 ? void 0 : _v[i]) === null || _w === void 0 ? void 0 : _w.data[j]).markerSize;
|
|
307
|
+
if (pointMarkerSize !== undefined) {
|
|
308
|
+
circleRadius = Math.min((pointMarkerSize * maxMarkerRange) / maxMarkerSize, pointMarkerSize);
|
|
309
|
+
}
|
|
310
|
+
var isLegendSelected = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;
|
|
311
|
+
var currentPointHidden = ((_y = (_x = _points.current) === null || _x === void 0 ? void 0 : _x[i]) === null || _y === void 0 ? void 0 : _y.hideNonActiveDots) && activePoint !== circleId;
|
|
312
|
+
pointsForSeries.push(React.createElement("circle", tslib_1.__assign({ id: circleId, key: circleId, r: circleRadius, cx: ((_z = _xAxisScale.current) === null || _z === void 0 ? void 0 : _z.call(_xAxisScale, x)) + _xBandwidth.current, cy: (_0 = _yAxisScale.current) === null || _0 === void 0 ? void 0 : _0.call(_yAxisScale, y), "data-is-focusable": isLegendSelected, onMouseOver: function (event) {
|
|
313
|
+
return _handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event);
|
|
314
|
+
}, onMouseMove: function (event) {
|
|
315
|
+
return _handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event);
|
|
316
|
+
}, onMouseOut: _handleMouseOut, onFocus: function () { return _handleFocus(seriesId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData); }, onBlur: _handleMouseOut }, _getClickHandler((_3 = (_2 = (_1 = _points.current) === null || _1 === void 0 ? void 0 : _1[i]) === null || _2 === void 0 ? void 0 : _2.data[j]) === null || _3 === void 0 ? void 0 : _3.onDataPointClick), { opacity: isLegendSelected && !currentPointHidden ? 1 : 0.1, fill: _getPointFill(seriesColor, circleId), stroke: seriesColor, role: "img", "aria-label": _getAriaLabel(i, j), tabIndex: ((_5 = (_4 = _points.current) === null || _4 === void 0 ? void 0 : _4[i]) === null || _5 === void 0 ? void 0 : _5.legend) !== '' ? 0 : undefined })));
|
|
317
|
+
};
|
|
318
|
+
for (var j = 0; j < ((_s = (_r = (_q = _points.current) === null || _q === void 0 ? void 0 : _q[i]) === null || _r === void 0 ? void 0 : _r.data) === null || _s === void 0 ? void 0 : _s.length); j++) {
|
|
319
|
+
_loop_2(j);
|
|
320
|
+
}
|
|
321
|
+
series.push(React.createElement("g", { key: "series_".concat(i), role: "region", "aria-label": "".concat(legendVal, ", series ").concat(i + 1, " of ").concat((_6 = _points.current) === null || _6 === void 0 ? void 0 : _6.length, " with ").concat((_9 = (_8 = (_7 = _points.current) === null || _7 === void 0 ? void 0 : _7[i]) === null || _8 === void 0 ? void 0 : _8.data) === null || _9 === void 0 ? void 0 : _9.length, " data points.") }, pointsForSeries));
|
|
322
|
+
};
|
|
323
|
+
for (var i = ((_h = _points.current) === null || _h === void 0 ? void 0 : _h.length) - 1; i >= 0; i--) {
|
|
324
|
+
_loop_1(i);
|
|
325
|
+
}
|
|
326
|
+
var classNames = getClassNames(props.styles, {
|
|
327
|
+
theme: props.theme,
|
|
328
|
+
});
|
|
329
|
+
// Removing un wanted tooltip div from DOM, when prop not provided.
|
|
330
|
+
if (!props.showXAxisLablesTooltip) {
|
|
331
|
+
try {
|
|
332
|
+
document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
|
|
333
|
+
// eslint-disable-next-line no-empty
|
|
334
|
+
}
|
|
335
|
+
catch (e) { }
|
|
336
|
+
}
|
|
337
|
+
// Used to display tooltip at x axis labels.
|
|
338
|
+
if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {
|
|
339
|
+
var xAxisElement = (0, d3_selection_1.select)(xElement).call(_xAxisScale.current);
|
|
340
|
+
try {
|
|
341
|
+
document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
|
|
342
|
+
// eslint-disable-next-line no-empty
|
|
343
|
+
}
|
|
344
|
+
catch (e) { }
|
|
345
|
+
var tooltipProps = {
|
|
346
|
+
tooltipCls: classNames.tooltip,
|
|
347
|
+
id: _tooltipId,
|
|
348
|
+
xAxis: xAxisElement,
|
|
349
|
+
};
|
|
350
|
+
xAxisElement && (0, index_4.tooltipOfAxislabels)(tooltipProps);
|
|
351
|
+
}
|
|
352
|
+
return series;
|
|
353
|
+
}, [
|
|
354
|
+
_xAxisScale,
|
|
355
|
+
_yAxisScale,
|
|
356
|
+
props.data.scatterChartData,
|
|
357
|
+
props.theme,
|
|
358
|
+
props.styles,
|
|
359
|
+
props.showXAxisLablesTooltip,
|
|
360
|
+
props.wrapXAxisLables,
|
|
361
|
+
_circleId,
|
|
362
|
+
_getAriaLabel,
|
|
363
|
+
_getPointFill,
|
|
364
|
+
_handleFocus,
|
|
365
|
+
_handleHover,
|
|
366
|
+
_handleMouseOut,
|
|
367
|
+
_legendHighlighted,
|
|
368
|
+
_noLegendHighlighted,
|
|
369
|
+
_seriesId,
|
|
370
|
+
_tooltipId,
|
|
371
|
+
_xAxisType,
|
|
372
|
+
activePoint,
|
|
373
|
+
isSelectedLegend,
|
|
374
|
+
selectedLegendPoints,
|
|
375
|
+
]);
|
|
376
|
+
var _initializeScatterChartData = React.useCallback(function (xScale, yScale, containerHeight, containerWidth, xElement) {
|
|
377
|
+
_xAxisScale.current = xScale;
|
|
378
|
+
_yAxisScale.current = yScale;
|
|
379
|
+
renderSeries.current = _createPlot(xElement, containerHeight);
|
|
380
|
+
}, [renderSeries, _xAxisScale, _yAxisScale, _createPlot]);
|
|
381
|
+
/**
|
|
382
|
+
* Screen readers announce an element as clickable if the onClick attribute is set.
|
|
383
|
+
* This function sets the attribute only when a click event handler is provided.*/
|
|
384
|
+
function _getClickHandler(func) {
|
|
385
|
+
if (func) {
|
|
386
|
+
return {
|
|
387
|
+
onClick: func,
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
return {};
|
|
391
|
+
}
|
|
392
|
+
function _isChartEmpty() {
|
|
393
|
+
return !(props.data &&
|
|
394
|
+
props.data.scatterChartData &&
|
|
395
|
+
props.data.scatterChartData.length > 0 &&
|
|
396
|
+
props.data.scatterChartData.filter(function (item) { return item.data.length; }).length > 0);
|
|
397
|
+
}
|
|
398
|
+
function _closeCallout() {
|
|
399
|
+
setCalloutVisible(false);
|
|
400
|
+
}
|
|
401
|
+
var _createStringYAxis = React.useCallback(function () {
|
|
402
|
+
var createStringAxisprops = [];
|
|
403
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
404
|
+
createStringAxisprops[_i] = arguments[_i];
|
|
405
|
+
}
|
|
406
|
+
return index_2.createStringYAxis.apply(void 0, createStringAxisprops);
|
|
407
|
+
}, []);
|
|
408
|
+
var legendProps = props.legendProps, tickValues = props.tickValues, tickFormat = props.tickFormat;
|
|
409
|
+
_points.current = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);
|
|
410
|
+
var points = _points.current;
|
|
411
|
+
if (legendProps && !!legendProps.canSelectMultipleLegends) {
|
|
412
|
+
points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points.current;
|
|
413
|
+
_calloutPoints = (0, index_4.calloutData)(points);
|
|
414
|
+
}
|
|
415
|
+
var legendBars = null;
|
|
416
|
+
// reduce computation cost by only creating legendBars
|
|
417
|
+
// if when hideLegend is false.
|
|
418
|
+
// NOTE: they are rendered only when hideLegend is false in CartesianChart.
|
|
419
|
+
if (!props.hideLegend) {
|
|
420
|
+
legendBars = _createLegends(_points.current); // ToDo: Memoize legends to improve performance.
|
|
421
|
+
}
|
|
422
|
+
var calloutProps = tslib_1.__assign({ isCalloutVisible: isCalloutVisible, directionalHint: react_1.DirectionalHint.topAutoEdge, YValueHover: YValueHover, hoverXValue: hoverXValue, id: "toolTip".concat(_uniqueCallOutID.current), target: refSelected, isBeakVisible: false, gapSpace: 15, onDismiss: _closeCallout, preventDismissOnEvent: function () { return true; }, hidden: !(!props.hideTooltip && isCalloutVisible), descriptionMessage: props.getCalloutDescriptionMessage && stackCalloutProps
|
|
423
|
+
? props.getCalloutDescriptionMessage(stackCalloutProps)
|
|
424
|
+
: undefined, 'data-is-focusable': true, xAxisCalloutAccessibilityData: _xAxisCalloutAccessibilityData }, props.calloutProps);
|
|
425
|
+
var tickParams = {
|
|
426
|
+
tickValues: tickValues,
|
|
427
|
+
tickFormat: tickFormat,
|
|
428
|
+
};
|
|
429
|
+
var xAxisLabels = _points.current
|
|
430
|
+
.map(function (point) { return point.data.map(function (dp) { return dp.x; }); })
|
|
431
|
+
.flat();
|
|
432
|
+
_xAxisLabels = Array.from(new Set(xAxisLabels));
|
|
433
|
+
return !_isChartEmpty() ? (React.createElement(index_3.CartesianChart, tslib_1.__assign({}, props, { ref: cartesianChartRef, chartTitle: props.data.chartTitle, isCalloutForStack: true, points: points, chartType: index_4.ChartTypes.ScatterChart, calloutProps: calloutProps, tickParams: tickParams, legendBars: legendBars, getmargins: _getMargins, getMinMaxOfYAxis: index_2.findNumericMinMaxOfY, getDomainNRangeValues: getDomainNRangeValuesScatterChart, createYAxis: index_2.createYAxisForScatterChart, createStringYAxis: _createStringYAxis, getGraphData: _initializeScatterChartData, xAxisType: _xAxisType, onChartMouseLeave: _handleChartMouseLeave, enableFirstRenderOptimization: _firstRenderOptimization, datasetForXAxisDomain: _xAxisLabels, componentRef: cartesianChartRef,
|
|
434
|
+
/* eslint-disable react/jsx-no-bind */
|
|
435
|
+
// eslint-disable-next-line react/no-children-prop
|
|
436
|
+
children: function (childProps) {
|
|
437
|
+
_xAxisScale.current = childProps.xScale;
|
|
438
|
+
_yAxisScale.current = childProps.yScalePrimary;
|
|
439
|
+
return (React.createElement(React.Fragment, null,
|
|
440
|
+
React.createElement("g", null,
|
|
441
|
+
React.createElement("line", { x1: 0, y1: 0, x2: 0, y2: childProps.containerHeight, stroke: '#323130', id: _verticalLine, visibility: 'hidden', strokeDasharray: '5,5' }),
|
|
442
|
+
React.createElement("g", null, renderSeries.current))));
|
|
443
|
+
} }))) : (React.createElement("div", { id: _emptyChartId, role: 'alert', style: { opacity: '0' }, "aria-label": 'Graph has no data to display' }));
|
|
444
|
+
});
|
|
445
|
+
exports.ScatterChartBase.displayName = 'ScatterChart';
|
|
446
|
+
});
|
|
447
|
+
//# sourceMappingURL=ScatterChart.base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScatterChart.base.js","sourceRoot":"../src/","sources":["components/ScatterChart/ScatterChart.base.tsx"],"names":[],"mappings":";;;;IAwCA,IAAM,aAAa,GAAG,IAAA,0BAAkB,GAAgD,CAAC;IAEzF,8FAA8F;IAC9F;;;OAGG;IACU,QAAA,gBAAgB,GAAgD,KAAK,CAAC,UAAU,CAG3F,UAAC,KAAK,EAAE,YAAY;QACpB,IAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,cAAM,OAAA,IAAA,aAAK,EAAC,QAAQ,CAAC,EAAf,CAAe,EAAE,EAAE,CAAC,CAAC;QAC3D,IAAM,SAAS,GAAW,KAAK,CAAC,OAAO,CAAC,cAAM,OAAA,IAAA,aAAK,EAAC,UAAU,CAAC,EAAjB,CAAiB,EAAE,EAAE,CAAC,CAAC;QACrE,IAAM,aAAa,GAAW,KAAK,CAAC,OAAO,CAAC,cAAM,OAAA,IAAA,aAAK,EAAC,cAAc,CAAC,EAArB,CAAqB,EAAE,EAAE,CAAC,CAAC;QAC7E,IAAM,UAAU,GAAW,KAAK,CAAC,OAAO,CAAC,cAAM,OAAA,IAAA,aAAK,EAAC,wBAAwB,CAAC,EAA/B,CAA+B,EAAE,EAAE,CAAC,CAAC;QACpF,IAAM,wBAAwB,G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D,CACH,CAAC,CAAC,CAAC,CACF,6BAAK,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,gBAAc,8BAA8B,GAAI,CAC/G,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,wBAAgB,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import * as React from 'react';\nimport { IChildProps, IScatterChartStyleProps, IScatterChartStyles, IScatterChartProps } from './ScatterChart.types';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport { ILegend, ILegendContainer, Legends } from '../Legends/index';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport {\n areArraysEqual,\n createStringYAxis,\n createYAxisForScatterChart,\n domainRangeOfDateForScatterChart,\n domainRangeOfNumericForScatterChart,\n domainRangeOfXStringAxis,\n findNumericMinMaxOfY,\n} from '../../utilities/index';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ICustomizedCalloutData,\n IMargins,\n IRefArrayData,\n IChart,\n} from '../../index';\nimport {\n calloutData,\n ChartTypes,\n XAxisTypes,\n tooltipOfAxislabels,\n getTypeOfAxis,\n getNextColor,\n getColorFromToken,\n} from '../../utilities/index';\nimport { classNamesFunction, DirectionalHint, find, getId, getRTL } from '@fluentui/react';\nimport { IImageExportOptions, IScatterChartDataPoint, IScatterChartPoints } from '../../types/index';\nimport { toImage as convertToImage } from '../../utilities/image-export-utils';\nimport { formatDateToLocaleString } from '@fluentui/chart-utilities';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\n\ntype ScatterChartDataWithIndex = IScatterChartPoints & { index: number };\nconst getClassNames = classNamesFunction<IScatterChartStyleProps, IScatterChartStyles>();\n\n// Create a ScatterChart variant which uses these default styles and this styled subcomponent.\n/**\n * ScatterChart component\n * {@docCategory ScatterChart}\n */\nexport const ScatterChartBase: React.FunctionComponent<IScatterChartProps> = React.forwardRef<\n HTMLDivElement,\n IScatterChartProps\n>((props, forwardedRef) => {\n const _circleId = React.useMemo(() => getId('circle'), []);\n const _seriesId: string = React.useMemo(() => getId('seriesID'), []);\n const _verticalLine: string = React.useMemo(() => getId('verticalLine'), []);\n const _tooltipId: string = React.useMemo(() => getId('ScatterChartTooltipId_'), []);\n const _firstRenderOptimization = true;\n const _emptyChartId: string = React.useMemo(() => getId('_ScatterChart_empty'), []);\n const _points = React.useRef<ScatterChartDataWithIndex[]>(\n _injectIndexPropertyInScatterChartData(props.data.scatterChartData),\n );\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _calloutPoints = React.useMemo(() => calloutData(_points.current as any) || [], [_points]);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _xAxisScale: any = React.useRef<any>('');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _yAxisScale: any = React.useRef<any>('');\n const _uniqueCallOutID = React.useRef<string | null>(null);\n const _refArray = React.useMemo(() => [], []);\n const margins = React.useRef<IMargins | null>(null);\n const renderSeries = React.useRef<JSX.Element[]>([]);\n let _xAxisLabels: string[] = [];\n const _xAxisCalloutAccessibilityData: IAccessibilityProps = {};\n const _xBandwidth = React.useRef<number>(0);\n const cartesianChartRef = React.useRef<IChart>(null);\n const legendsRef = React.useRef<ILegendContainer>(null);\n\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [YValueHover, setYValueHover] = React.useState<[]>([]);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const [selectedLegendPoints, setSelectedLegendPoints] = React.useState<any[]>([]);\n const [isSelectedLegend, setIsSelectedLegend] = React.useState<boolean>(false);\n const [activePoint, setActivePoint] = React.useState<string>('');\n const [stackCalloutProps, setStackCalloutProps] = React.useState<ICustomizedCalloutData>();\n const [isCalloutVisible, setCalloutVisible] = React.useState(false);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>([]);\n const [refSelected, setRefSelected] = React.useState<string>('');\n const prevPropsRef = React.useRef<IScatterChartProps | null>(null);\n\n React.useEffect(() => {\n if (prevPropsRef.current) {\n const prevProps = prevPropsRef.current;\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n }\n prevPropsRef.current = props;\n }, [props]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n toImage: (opts?: IImageExportOptions): Promise<string> => {\n return convertToImage(cartesianChartRef.current?.chartContainer, legendsRef.current?.toSVG, getRTL(), opts);\n },\n }),\n [],\n );\n\n const _xAxisType: XAxisTypes =\n props.data.scatterChartData! &&\n props.data.scatterChartData!.length > 0 &&\n props.data.scatterChartData![0].data &&\n props.data.scatterChartData![0].data.length > 0\n ? (getTypeOfAxis(props.data.scatterChartData![0].data[0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n\n const pointsRef = React.useRef<ScatterChartDataWithIndex[] | []>([]);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const calloutPointsRef = React.useRef<any[]>([]);\n React.useEffect(() => {\n /** note that height and width are not used to resize or set as dimesions of the chart,\n * fitParentContainer is responisble for setting the height and width or resizing of the svg/chart\n */\n\n if (\n _points.current !== _injectIndexPropertyInScatterChartData(props.data.scatterChartData) ||\n props.data !== _points.current\n ) {\n pointsRef.current = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);\n calloutPointsRef.current = calloutData(pointsRef.current);\n }\n }, [props.height, props.width, props.data, _points]);\n\n function _injectIndexPropertyInScatterChartData(\n scatterChartData?: IScatterChartPoints[],\n ): ScatterChartDataWithIndex[] | [] {\n return scatterChartData\n ? scatterChartData.map((item: IScatterChartPoints, index: number) => {\n let color: string;\n if (typeof item.color === 'undefined') {\n color = getNextColor(index, 0);\n } else {\n color = getColorFromToken(item.color);\n }\n return {\n ...item,\n index: -1,\n color,\n };\n })\n : [];\n }\n\n const _getMargins = React.useCallback((_margins: IMargins) => {\n margins.current = _margins;\n }, []);\n\n function _onHoverCardHide() {\n setSelectedLegendPoints([]);\n setIsSelectedLegend(false);\n }\n\n function _createLegends(data: ScatterChartDataWithIndex[]): JSX.Element {\n const { legendProps } = props;\n const isLegendMultiSelectEnabled = !!(legendProps && !!legendProps.canSelectMultipleLegends);\n const legendDataItems = data.map((point: ScatterChartDataWithIndex) => {\n const color: string = point.color!;\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color,\n onMouseOutAction: () => {\n setActiveLegend('');\n },\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(point.legend);\n },\n ...(point.legendShape && {\n shape: point.legendShape,\n }),\n };\n return legend;\n });\n\n return (\n <Legends\n legends={[...legendDataItems]}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowProps={props.legendsOverflowProps}\n focusZonePropsInHoverCard={props.focusZonePropsForLegendsInHoverCard}\n overflowText={props.legendsOverflowText}\n {...(isLegendMultiSelectEnabled && { onLegendHoverCardLeave: _onHoverCardHide })}\n onChange={_onLegendSelectionChange}\n {...props.legendProps}\n />\n );\n }\n\n function _onLegendSelectionChange(\n legendsSelected: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(legendsSelected);\n } else {\n setSelectedLegends(legendsSelected.slice(-1));\n }\n\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(legendsSelected, event, currentLegend);\n }\n }\n\n const _getPointFill = React.useCallback(\n (lineColor: string, pointId: string) => {\n const { theme } = props;\n if (activePoint === pointId) {\n return theme!.semanticColors.bodyBackground;\n } else {\n return lineColor;\n }\n },\n [activePoint, props],\n );\n\n const getDomainNRangeValuesScatterChart = React.useCallback(\n (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n points: any,\n domainMargins: IMargins,\n width: number,\n _chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n _barWidth: number,\n tickValues: number[] | Date[] | string[] | undefined,\n ) => {\n if (xAxisType === XAxisTypes.NumericAxis) {\n return domainRangeOfNumericForScatterChart(points, domainMargins, width, isRTL);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n return domainRangeOfDateForScatterChart(points, domainMargins, width, isRTL, tickValues! as Date[]);\n }\n // String Axis type\n return domainRangeOfXStringAxis(domainMargins, width, isRTL);\n },\n [],\n );\n\n const _handleFocus = React.useCallback(\n (\n seriesId: string,\n x: number | Date | string,\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData?: IAccessibilityProps,\n ) => {\n _uniqueCallOutID.current = circleId;\n const formattedData = x instanceof Date ? formatDateToLocaleString(x, props.culture, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal) as\n | { x: string | number; values: [] }\n | undefined;\n // if no points need to be called out then don't show vertical line and callout card\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr('transform', () => `translate(${_xAxisScale.current?.(x) + _xBandwidth.current}, 0)`)\n .attr('visibility', 'visibility');\n _refArray.forEach((obj: IRefArrayData) => {\n if (obj.index === seriesId) {\n setCalloutVisible(true);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setRefSelected(`#${circleId}`);\n setYValueHover(found!.values);\n setActivePoint(circleId);\n }\n });\n } else {\n setActivePoint(circleId);\n }\n },\n [_verticalLine, _xAxisScale, _xBandwidth, _calloutPoints, _refArray, props.culture, props.useUTC],\n );\n\n const _handleHover = React.useCallback(\n (\n x: number | Date | string,\n y: number | Date,\n lineHeight: number,\n xAxisCalloutData: string | undefined,\n circleId: string,\n xAxisCalloutAccessibilityData: IAccessibilityProps | undefined,\n mouseEvent: React.MouseEvent<SVGElement>,\n ) => {\n mouseEvent?.persist();\n const formattedData = x instanceof Date ? formatDateToLocaleString(x, props.culture, props.useUTC) : x;\n const xVal = x instanceof Date ? x.getTime() : x;\n const found = find(_calloutPoints, (element: { x: string | number }) => element.x === xVal) as\n | { x: string | number; values: [] }\n | undefined;\n // if no points need to be called out then don't show vertical line and callout card\n if (found) {\n d3Select(`#${_verticalLine}`)\n .attr(\n 'transform',\n () => `translate(${_xAxisScale.current?.(x) + _xBandwidth.current}, ${_yAxisScale.current?.(y)})`,\n )\n .attr('visibility', 'visibility')\n .attr('y2', `${lineHeight - _yAxisScale.current?.(y)}`);\n\n if (_uniqueCallOutID.current !== circleId) {\n _uniqueCallOutID.current = circleId;\n setCalloutVisible(true);\n xAxisCalloutData ? setHoverXValue(xAxisCalloutData) : setHoverXValue('' + formattedData);\n setRefSelected(`#${circleId}`);\n setYValueHover(found.values);\n setStackCalloutProps(found!);\n setActivePoint(circleId);\n }\n } else {\n setActivePoint(circleId);\n }\n },\n [_verticalLine, _xAxisScale, _xBandwidth, _calloutPoints, props.culture, props.useUTC],\n );\n\n const _handleMouseOut = React.useCallback(() => {\n d3Select(`#${_verticalLine}`).attr('visibility', 'hidden');\n }, [_verticalLine]);\n\n const _handleChartMouseLeave = React.useCallback(() => {\n _uniqueCallOutID.current = null;\n setActivePoint('');\n if (isCalloutVisible) {\n setCalloutVisible(false);\n }\n }, [_uniqueCallOutID, isCalloutVisible, setActivePoint, setCalloutVisible]);\n\n /**\n * This function checks if none of the legends is selected or hovered.*/\n\n const _noLegendHighlighted = React.useCallback((): boolean => {\n return selectedLegends.length === 0;\n }, [selectedLegends]);\n\n const _getHighlightedLegend = React.useCallback((): string[] => {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }, [selectedLegends, activeLegend]);\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it*/\n\n const _legendHighlighted = React.useCallback(\n (legend: string): boolean => {\n return _getHighlightedLegend().includes(legend);\n },\n [_getHighlightedLegend],\n );\n\n const _getAriaLabel = React.useCallback(\n (seriesIndex: number, pointIndex: number): string => {\n const series = _points.current?.[seriesIndex];\n const point = series.data[pointIndex];\n const formattedDate =\n point.x instanceof Date ? formatDateToLocaleString(point.x, props.culture, props.useUTC) : point.x;\n const xValue = point.xAxisCalloutData || formattedDate;\n const legend = series.legend;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n },\n [_points, props.culture, props.useUTC],\n );\n\n const _createPlot = React.useCallback(\n (xElement: SVGElement, containerHeight: number): JSX.Element[] => {\n const series: JSX.Element[] = [];\n if (isSelectedLegend) {\n _points.current = selectedLegendPoints;\n } else {\n _points.current = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);\n }\n\n const yMax = d3Max(_points.current, (point: IScatterChartPoints) => {\n return d3Max(point.data as IScatterChartDataPoint[], (item: IScatterChartDataPoint) => item.y)!;\n })!;\n const yMin = d3Min(_points.current, (point: IScatterChartPoints) => {\n return d3Min(point.data as IScatterChartDataPoint[], (item: IScatterChartDataPoint) => item.y)!;\n })!;\n const yPadding = (yMax - yMin) * 0.1;\n const yPaddingRange = Math.abs(_yAxisScale.current?.(yMin + yPadding) - _yAxisScale.current?.(yMin));\n\n let maxMarkerRange = 40;\n let xPaddingRange = 0;\n if (_xAxisType === XAxisTypes.StringAxis) {\n _xBandwidth.current = _xAxisScale.current?.bandwidth() / 2;\n xPaddingRange = _xBandwidth.current;\n } else if (_xAxisType === XAxisTypes.DateAxis) {\n const xMin = d3Min(_points.current, (point: IScatterChartPoints) => {\n return d3Min(point.data as IScatterChartDataPoint[], (item: IScatterChartDataPoint) => item.x as Date)!;\n })!;\n\n const xMax = d3Max(_points.current, (point: IScatterChartPoints) => {\n return d3Max(point.data as IScatterChartDataPoint[], (item: IScatterChartDataPoint) => {\n return item.x as Date;\n });\n })!;\n\n const xPadding = (xMax.getTime() - xMin.getTime()) * 0.1;\n xPaddingRange = Math.abs(\n _xAxisScale.current?.(new Date(xMin.getTime() + xPadding)) - _xAxisScale.current?.(xMin),\n );\n } else {\n const xMin = d3Min(_points.current, (point: IScatterChartPoints) => {\n return d3Min(point.data as IScatterChartDataPoint[], (item: IScatterChartDataPoint) => item.x as number)!;\n })!;\n\n const xMax = d3Max(_points.current, (point: IScatterChartPoints) => {\n return d3Max(point.data as IScatterChartDataPoint[], (item: IScatterChartDataPoint) => {\n return item.x as number;\n });\n })!;\n\n const xPadding = (xMax - xMin) * 0.1;\n xPaddingRange = Math.abs(_xAxisScale.current?.(xMin + xPadding) - _xAxisScale.current?.(xMin));\n }\n maxMarkerRange = Math.min(maxMarkerRange, Math.min(xPaddingRange, yPaddingRange));\n\n const maxMarkerSize = d3Max(_points.current, (point: IScatterChartPoints) => {\n return d3Max(point.data as IScatterChartDataPoint[], (item: IScatterChartDataPoint) => {\n return item.markerSize as number;\n });\n })!;\n\n for (let i = _points.current?.length - 1; i >= 0; i--) {\n const pointsForSeries: JSX.Element[] = [];\n\n const legendVal: string = _points.current?.[i]?.legend;\n const seriesColor: string = _points.current?.[i]?.color!;\n const verticaLineHeight = containerHeight - (margins.current?.bottom ?? 0) + 6;\n\n for (let j = 0; j < _points.current?.[i]?.data?.length; j++) {\n const seriesId = `${_seriesId}_${i}_${j}`;\n const circleId = `${_circleId}_${i}_${j}`;\n const { x, y, xAxisCalloutData, xAxisCalloutAccessibilityData } = _points.current?.[i]?.data[j];\n let circleRadius = 3.5;\n const pointMarkerSize = (_points.current?.[i]?.data[j] as IScatterChartDataPoint).markerSize;\n if ((pointMarkerSize as number) !== undefined) {\n circleRadius = Math.min((pointMarkerSize! * maxMarkerRange) / maxMarkerSize, pointMarkerSize!);\n }\n\n const isLegendSelected: boolean = _legendHighlighted(legendVal) || _noLegendHighlighted() || isSelectedLegend;\n\n const currentPointHidden = _points.current?.[i]?.hideNonActiveDots && activePoint !== circleId;\n pointsForSeries.push(\n <circle\n id={circleId}\n key={circleId}\n r={circleRadius}\n cx={_xAxisScale.current?.(x) + _xBandwidth.current}\n cy={_yAxisScale.current?.(y)}\n data-is-focusable={isLegendSelected}\n onMouseOver={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event)\n }\n onMouseMove={(event: React.MouseEvent<SVGElement>) =>\n _handleHover(x, y, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData, event)\n }\n onMouseOut={_handleMouseOut}\n onFocus={() => _handleFocus(seriesId, x, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData)}\n onBlur={_handleMouseOut}\n {..._getClickHandler(_points.current?.[i]?.data[j]?.onDataPointClick)}\n opacity={isLegendSelected && !currentPointHidden ? 1 : 0.1}\n fill={_getPointFill(seriesColor, circleId)}\n stroke={seriesColor}\n role=\"img\"\n aria-label={_getAriaLabel(i, j)}\n tabIndex={_points.current?.[i]?.legend !== '' ? 0 : undefined}\n />,\n );\n }\n\n series.push(\n <g\n key={`series_${i}`}\n role=\"region\"\n aria-label={`${legendVal}, series ${i + 1} of ${_points.current?.length} with ${\n _points.current?.[i]?.data?.length\n } data points.`}\n >\n {pointsForSeries}\n </g>,\n );\n }\n const classNames = getClassNames(props.styles!, {\n theme: props.theme!,\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(_xAxisScale.current);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classNames.tooltip!,\n id: _tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return series;\n },\n [\n _xAxisScale,\n _yAxisScale,\n props.data.scatterChartData,\n props.theme,\n props.styles,\n props.showXAxisLablesTooltip,\n props.wrapXAxisLables,\n _circleId,\n _getAriaLabel,\n _getPointFill,\n _handleFocus,\n _handleHover,\n _handleMouseOut,\n _legendHighlighted,\n _noLegendHighlighted,\n _seriesId,\n _tooltipId,\n _xAxisType,\n activePoint,\n isSelectedLegend,\n selectedLegendPoints,\n ],\n );\n\n const _initializeScatterChartData = React.useCallback(\n (\n xScale: NumericAxis,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n _xAxisScale.current = xScale;\n _yAxisScale.current = yScale;\n renderSeries.current = _createPlot(xElement!, containerHeight!);\n },\n [renderSeries, _xAxisScale, _yAxisScale, _createPlot],\n );\n\n /**\n * Screen readers announce an element as clickable if the onClick attribute is set.\n * This function sets the attribute only when a click event handler is provided.*/\n\n function _getClickHandler(func?: () => void): { onClick?: () => void } {\n if (func) {\n return {\n onClick: func,\n };\n }\n\n return {};\n }\n\n function _isChartEmpty(): boolean {\n return !(\n props.data &&\n props.data.scatterChartData &&\n props.data.scatterChartData.length > 0 &&\n props.data.scatterChartData.filter((item: IScatterChartPoints) => item.data.length).length > 0\n );\n }\n\n function _closeCallout() {\n setCalloutVisible(false);\n }\n\n const _createStringYAxis = React.useCallback((...createStringAxisprops: Parameters<typeof createStringYAxis>) => {\n return createStringYAxis(...createStringAxisprops);\n }, []);\n\n const { legendProps, tickValues, tickFormat } = props;\n _points.current = _injectIndexPropertyInScatterChartData(props.data.scatterChartData);\n\n let points = _points.current;\n if (legendProps && !!legendProps.canSelectMultipleLegends) {\n points = selectedLegendPoints.length >= 1 ? selectedLegendPoints : _points.current;\n _calloutPoints = calloutData(points);\n }\n\n let legendBars = null;\n // reduce computation cost by only creating legendBars\n // if when hideLegend is false.\n // NOTE: they are rendered only when hideLegend is false in CartesianChart.\n if (!props.hideLegend) {\n legendBars = _createLegends(_points.current!); // ToDo: Memoize legends to improve performance.\n }\n const calloutProps = {\n isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n YValueHover,\n hoverXValue,\n id: `toolTip${_uniqueCallOutID.current}`,\n target: refSelected,\n isBeakVisible: false,\n gapSpace: 15,\n onDismiss: _closeCallout,\n preventDismissOnEvent: () => true,\n hidden: !(!props.hideTooltip && isCalloutVisible),\n descriptionMessage:\n props.getCalloutDescriptionMessage && stackCalloutProps\n ? props.getCalloutDescriptionMessage(stackCalloutProps)\n : undefined,\n 'data-is-focusable': true,\n xAxisCalloutAccessibilityData: _xAxisCalloutAccessibilityData,\n ...props.calloutProps,\n };\n const tickParams = {\n tickValues,\n tickFormat,\n };\n\n const xAxisLabels: string[] = _points.current\n .map((point: ScatterChartDataWithIndex) => point.data.map((dp: IScatterChartDataPoint) => dp.x as string))\n .flat();\n\n _xAxisLabels = Array.from(new Set(xAxisLabels));\n\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n ref={cartesianChartRef}\n chartTitle={props.data.chartTitle}\n isCalloutForStack\n points={points}\n chartType={ChartTypes.ScatterChart}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n getmargins={_getMargins}\n getMinMaxOfYAxis={findNumericMinMaxOfY}\n getDomainNRangeValues={getDomainNRangeValuesScatterChart}\n createYAxis={createYAxisForScatterChart}\n createStringYAxis={_createStringYAxis}\n getGraphData={_initializeScatterChartData}\n xAxisType={_xAxisType}\n onChartMouseLeave={_handleChartMouseLeave}\n enableFirstRenderOptimization={_firstRenderOptimization}\n datasetForXAxisDomain={_xAxisLabels}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(childProps: IChildProps) => {\n _xAxisScale.current = childProps.xScale!;\n _yAxisScale.current = childProps.yScalePrimary!;\n return (\n <>\n <g>\n <line\n x1={0}\n y1={0}\n x2={0}\n y2={childProps.containerHeight}\n stroke={'#323130'}\n id={_verticalLine}\n visibility={'hidden'}\n strokeDasharray={'5,5'}\n />\n <g>{renderSeries.current}</g>\n </g>\n </>\n );\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nScatterChartBase.displayName = 'ScatterChart';\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
define(["require", "exports", "@fluentui/react/lib/Utilities", "./ScatterChart.base", "./ScatterChart.styles"], function (require, exports, Utilities_1, ScatterChart_base_1, ScatterChart_styles_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ScatterChart = void 0;
|
|
5
|
+
// Create a ScatterChart variant which uses these default styles and this styled subcomponent.
|
|
6
|
+
/**
|
|
7
|
+
* Scatterchart component
|
|
8
|
+
* {@docCategory ScatterChart}
|
|
9
|
+
*/
|
|
10
|
+
exports.ScatterChart = (0, Utilities_1.styled)(ScatterChart_base_1.ScatterChartBase, ScatterChart_styles_1.getStyles);
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=ScatterChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScatterChart.js","sourceRoot":"../src/","sources":["components/ScatterChart/ScatterChart.tsx"],"names":[],"mappings":";;;;IAMA,8FAA8F;IAC9F;;;OAGG;IACU,QAAA,YAAY,GAAgD,IAAA,kBAAM,EAI7E,oCAAgB,EAAE,+BAAS,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '@fluentui/react/lib/Utilities';\nimport { IScatterChartProps, IScatterChartStyleProps, IScatterChartStyles } from './ScatterChart.types';\nimport { ScatterChartBase } from './ScatterChart.base';\nimport { getStyles } from './ScatterChart.styles';\n\n// Create a ScatterChart variant which uses these default styles and this styled subcomponent.\n/**\n * Scatterchart component\n * {@docCategory ScatterChart}\n */\nexport const ScatterChart: React.FunctionComponent<IScatterChartProps> = styled<\n IScatterChartProps,\n IScatterChartStyleProps,\n IScatterChartStyles\n>(ScatterChartBase, getStyles);\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
define(["require", "exports", "tslib"], function (require, exports, tslib_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getStyles = void 0;
|
|
5
|
+
var getStyles = function (props) {
|
|
6
|
+
return {
|
|
7
|
+
tooltip: tslib_1.__assign(tslib_1.__assign({}, props.theme.fonts.medium), { display: 'flex', flexDirection: 'column', padding: '8px', position: 'absolute', textAlign: 'center', top: '0px', background: props.theme.semanticColors.bodyBackground, borderRadius: '2px', pointerEvents: 'none', color: props.theme.semanticColors.bodyText }),
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
exports.getStyles = getStyles;
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=ScatterChart.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScatterChart.styles.js","sourceRoot":"../src/","sources":["components/ScatterChart/ScatterChart.styles.ts"],"names":[],"mappings":";;;;IAEO,IAAM,SAAS,GAAG,UAAC,KAA8B;QACtD,OAAO;YACL,OAAO,wCACF,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,MAAM,KAC5B,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,QAAQ,EACvB,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,QAAQ,EACnB,GAAG,EAAE,KAAK,EACV,UAAU,EAAE,KAAK,CAAC,KAAM,CAAC,cAAc,CAAC,cAAc,EACtD,YAAY,EAAE,KAAK,EACnB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,KAAK,CAAC,KAAM,CAAC,cAAc,CAAC,QAAQ,GAC5C;SACF,CAAC;IACJ,CAAC,CAAC;IAhBW,QAAA,SAAS,aAgBpB","sourcesContent":["import { IScatterChartStyleProps, IScatterChartStyles } from './ScatterChart.types';\n\nexport const getStyles = (props: IScatterChartStyleProps): IScatterChartStyles => {\n return {\n tooltip: {\n ...props.theme!.fonts.medium,\n display: 'flex',\n flexDirection: 'column',\n padding: '8px',\n position: 'absolute',\n textAlign: 'center',\n top: '0px',\n background: props.theme!.semanticColors.bodyBackground,\n borderRadius: '2px',\n pointerEvents: 'none',\n color: props.theme!.semanticColors.bodyText,\n },\n };\n};\n"]}
|