@fluentui/react-charting 5.24.10 → 5.24.12
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 +69 -1
- package/CHANGELOG.md +25 -2
- package/dist/react-charting.d.ts +18 -3
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +7 -3
- package/lib/components/AreaChart/AreaChart.base.js +4 -0
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.base.js +2 -1
- package/lib/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.types.d.ts +1 -0
- package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.js +4 -2
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.d.ts +4 -0
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +14 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +112 -12
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.js +1 -0
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.base.js +5 -6
- package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.styles.js +2 -4
- package/lib/components/DonutChart/DonutChart.styles.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.types.d.ts +4 -0
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.js +2 -0
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.base.js +2 -0
- package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.base.js +3 -5
- package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.styles.js +2 -4
- package/lib/components/GaugeChart/GaugeChart.styles.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.types.d.ts +4 -0
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +5 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js +3 -0
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js +4 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +6 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/Legends/Legends.base.js +5 -1
- package/lib/components/Legends/Legends.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.d.ts +1 -0
- package/lib/components/LineChart/LineChart.base.js +53 -12
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/PieChart/Arc/Arc.js +2 -0
- package/lib/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib/components/PieChart/Pie/Pie.js +2 -0
- package/lib/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib/components/PieChart/PieChart.base.js +1 -0
- package/lib/components/PieChart/PieChart.base.js.map +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js +13 -5
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.d.ts +2 -4
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.base.js +4 -6
- package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.styles.js +3 -0
- package/lib/components/SankeyChart/SankeyChart.styles.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.types.d.ts +4 -0
- package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.base.js +41 -8
- package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.base.d.ts +2 -2
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +6 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js +5 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib/components/TreeChart/TreeChart.base.js +17 -2
- package/lib/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +11 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
- package/lib/utilities/scatterpolar-utils.d.ts +22 -0
- package/lib/utilities/scatterpolar-utils.js +38 -0
- package/lib/utilities/scatterpolar-utils.js.map +1 -0
- package/lib/utilities/utilities.d.ts +6 -0
- package/lib/utilities/utilities.js +16 -4
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js +4 -0
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/ChartTable/ChartTable.base.js +2 -1
- package/lib-amd/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-amd/components/ChartTable/ChartTable.types.d.ts +1 -0
- package/lib-amd/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +4 -2
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +4 -0
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +14 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +111 -11
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/DonutChart/Arc/Arc.js +1 -0
- package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.base.js +5 -6
- package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.styles.js +2 -4
- package/lib-amd/components/DonutChart/DonutChart.styles.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.types.d.ts +4 -0
- package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-amd/components/DonutChart/Pie/Pie.js +2 -0
- package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/FunnelChart/FunnelChart.base.js +2 -0
- package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.base.js +3 -5
- package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.styles.js +2 -4
- package/lib-amd/components/GaugeChart/GaugeChart.styles.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +4 -0
- package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +5 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +3 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +4 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +6 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/Legends/Legends.base.js +5 -1
- package/lib-amd/components/Legends/Legends.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.d.ts +1 -0
- package/lib-amd/components/LineChart/LineChart.base.js +52 -12
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/PieChart/Arc/Arc.js +2 -0
- package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/PieChart/Pie/Pie.js +2 -0
- package/lib-amd/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/PieChart/PieChart.base.js +1 -0
- package/lib-amd/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.js +13 -5
- package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.types.d.ts +2 -4
- package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
- package/lib-amd/components/SankeyChart/SankeyChart.base.js +4 -6
- package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-amd/components/SankeyChart/SankeyChart.styles.js +3 -0
- package/lib-amd/components/SankeyChart/SankeyChart.styles.js.map +1 -1
- package/lib-amd/components/SankeyChart/SankeyChart.types.d.ts +4 -0
- package/lib-amd/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.base.js +40 -8
- package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-amd/components/Sparkline/Sparkline.base.d.ts +2 -2
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +6 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +5 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-amd/components/TreeChart/TreeChart.base.js +17 -2
- package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +11 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
- package/lib-amd/utilities/scatterpolar-utils.d.ts +22 -0
- package/lib-amd/utilities/scatterpolar-utils.js +43 -0
- package/lib-amd/utilities/scatterpolar-utils.js.map +1 -0
- package/lib-amd/utilities/utilities.d.ts +6 -0
- package/lib-amd/utilities/utilities.js +18 -5
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +4 -0
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.base.js +2 -1
- package/lib-commonjs/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.types.d.ts +1 -0
- package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +4 -2
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +4 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +14 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +111 -11
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +1 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js +5 -6
- package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.styles.js +2 -4
- package/lib-commonjs/components/DonutChart/DonutChart.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.d.ts +4 -0
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +2 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +2 -0
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +3 -5
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js +2 -4
- package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.d.ts +4 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +5 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +3 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js +4 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +6 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.base.js +5 -1
- package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.d.ts +1 -0
- package/lib-commonjs/components/LineChart/LineChart.base.js +52 -11
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/PieChart/Arc/Arc.js +2 -0
- package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/PieChart/Pie/Pie.js +2 -0
- package/lib-commonjs/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/PieChart/PieChart.base.js +1 -0
- package/lib-commonjs/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +13 -5
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.d.ts +2 -4
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +4 -6
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js +3 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.d.ts +4 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +40 -7
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.base.d.ts +2 -2
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +6 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +5 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/TreeChart/TreeChart.base.js +17 -2
- package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +11 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/utilities/ChartHoverCard/ChartHoverCard.base.js.map +1 -1
- package/lib-commonjs/utilities/scatterpolar-utils.d.ts +22 -0
- package/lib-commonjs/utilities/scatterpolar-utils.js +42 -0
- package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -0
- package/lib-commonjs/utilities/utilities.d.ts +6 -0
- package/lib-commonjs/utilities/utilities.js +18 -5
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +4 -4
- package/src/components/ChartTable/ChartTable.types.ts +1 -0
- package/src/components/CommonComponents/CartesianChart.types.ts +6 -0
- package/src/components/DonutChart/DonutChart.types.ts +5 -0
- package/src/components/GaugeChart/GaugeChart.types.ts +5 -0
- package/src/components/ResponsiveContainer/ResponsiveContainer.types.ts +3 -2
- package/src/components/SankeyChart/SankeyChart.types.ts +5 -0
|
@@ -28,12 +28,13 @@ var LegendsBase = /** @class */ (function (_super) {
|
|
|
28
28
|
isRTL: isRTL,
|
|
29
29
|
}, _this._rootElem);
|
|
30
30
|
};
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
31
32
|
_this._onRenderData = function (data) {
|
|
32
33
|
var _a = _this.props, overflowProps = _a.overflowProps, _b = _a.allowFocusOnLegends, allowFocusOnLegends = _b === void 0 ? true : _b, _c = _a.canSelectMultipleLegends, canSelectMultipleLegends = _c === void 0 ? false : _c;
|
|
33
34
|
var rootStyles = {
|
|
34
35
|
root: {
|
|
35
36
|
justifyContent: _this.props.centerLegends ? 'center' : 'unset',
|
|
36
|
-
flexWrap: 'wrap',
|
|
37
|
+
flexWrap: _this.props.enabledWrapLines ? 'wrap' : 'nowrap',
|
|
37
38
|
},
|
|
38
39
|
};
|
|
39
40
|
return (React.createElement(react_focus_1.FocusZone, tslib_1.__assign({}, (allowFocusOnLegends && {
|
|
@@ -99,8 +100,10 @@ var LegendsBase = /** @class */ (function (_super) {
|
|
|
99
100
|
(_b = (_a = _this.props).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, Object.keys(nextSelectedLegends), event, legend);
|
|
100
101
|
(_c = legend.action) === null || _c === void 0 ? void 0 : _c.call(legend);
|
|
101
102
|
};
|
|
103
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
102
104
|
_this._onRenderCompactCard = function (expandingCard) {
|
|
103
105
|
var _a = _this.props, _b = _a.allowFocusOnLegends, allowFocusOnLegends = _b === void 0 ? true : _b, className = _a.className, styles = _a.styles, theme = _a.theme, _c = _a.canSelectMultipleLegends, canSelectMultipleLegends = _c === void 0 ? false : _c;
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
104
107
|
var overflowHoverCardLegends = [];
|
|
105
108
|
var classNames = getClassNames(styles, {
|
|
106
109
|
theme: theme,
|
|
@@ -258,6 +261,7 @@ var LegendsBase = /** @class */ (function (_super) {
|
|
|
258
261
|
}
|
|
259
262
|
return prevState;
|
|
260
263
|
};
|
|
264
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
261
265
|
LegendsBase.prototype.render = function () {
|
|
262
266
|
var _this = this;
|
|
263
267
|
var _a = this.props, theme = _a.theme, className = _a.className, styles = _a.styles;
|
|
@@ -1 +1 @@
|
|
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,CAAC;IACJ,CAAC;IAEO,+BAAS,GAAjB,UAAkB,KAAa,EAAE,KAAa;QACpC,IAAA,KAAK,GAAK,IAAI,CAAC,KAAK,MAAf,CAAgB;QAC7B,IAAI,WAAW,GAAG,KAAK,CAAC;QACxB,sCAAsC;QACtC,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3B,6DAA6D;YAC7D,IAAI,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;gBACtC,WAAW,GAAG,KAAK,CAAC;YACtB,CAAC;YACD,oCAAoC;iBAC/B,CAAC;gBACJ,WAAW,GAAG,KAAM,CAAC,cAAc,CAAC,gBAAgB,CAAC;YACvD,CAAC;QACH,CAAC;QACD,2BAA2B;aACtB,CAAC;YACJ,iCAAiC;YACjC,oCAAoC;YACpC,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,EAAE,EAAE,CAAC;gBACxE,WAAW,GAAG,KAAK,CAAC;YACtB,CAAC;YACD,mEAAmE;iBAC9D,CAAC;gBACJ,WAAW,GAAG,KAAM,CAAC,cAAc,CAAC,gBAAgB,CAAC;YACvD,CAAC;QACH,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IACH,kBAAC;AAAD,CAAC,AAnbD,CAAiC,KAAK,CAAC,SAAS,GAmb/C;AAnbY,kCAAW","sourcesContent":["import * as React from 'react';\n\nimport { IContextualMenuItem } from '@fluentui/react/lib/ContextualMenu';\nimport { HoverCard, HoverCardType, IExpandingCardProps } from '@fluentui/react/lib/HoverCard';\nimport { classNamesFunction, find, getNativeProps, buttonProperties } from '@fluentui/react/lib/Utilities';\nimport { ResizeGroup } from '@fluentui/react/lib/ResizeGroup';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { OverflowSet, IOverflowSetItemProps } from '@fluentui/react/lib/OverflowSet';\nimport { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from '@fluentui/react-focus';\nimport {\n ILegend,\n ILegendsProps,\n LegendShape,\n ILegendsStyles,\n ILegendStyleProps,\n ILegendOverflowData,\n ILegendContainer,\n} from './Legends.types';\nimport { Shape } from './shape';\nimport { cloneLegendsToSVG } from '../../utilities/image-export-utils';\n\nconst getClassNames = classNamesFunction<ILegendStyleProps, ILegendsStyles>();\n\n// This is an internal interface used for rendering the legends with unique key\ninterface ILegendItem extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n name?: string;\n title: string;\n action: VoidFunction;\n hoverAction: VoidFunction;\n onMouseOutAction: VoidFunction;\n color: string;\n shape?: LegendShape;\n key: number;\n opacity?: number;\n stripePattern?: boolean;\n isLineLegendInBarChart?: boolean;\n}\n\nexport interface ILegendState {\n activeLegend: string;\n isHoverCardVisible: boolean;\n /** Set of legends selected, both for multiple selection and single selection */\n selectedLegends: { [key: string]: boolean };\n}\nexport class LegendsBase extends React.Component<ILegendsProps, ILegendState> implements ILegendContainer {\n private _hoverCardRef: HTMLDivElement;\n private _classNames: IProcessedStyleSet<ILegendsStyles>;\n /** Boolean variable to check if one or more legends are selected */\n private _isLegendSelected = false;\n private _rootElem: HTMLDivElement | null;\n\n public static getDerivedStateFromProps(newProps: ILegendsProps, prevState: ILegendState): ILegendState {\n const { selectedLegend, selectedLegends } = newProps;\n\n if (newProps.canSelectMultipleLegends && selectedLegends !== undefined) {\n return {\n ...prevState,\n selectedLegends: selectedLegends.reduce(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (combinedDict: any, key: any) => ({ [key]: true, ...combinedDict }),\n {},\n ),\n };\n }\n\n if (!newProps.canSelectMultipleLegends && selectedLegend !== undefined) {\n return {\n ...prevState,\n selectedLegends: { [selectedLegend]: true },\n };\n }\n\n return prevState;\n }\n\n public constructor(props: ILegendsProps) {\n super(props);\n //let defaultSelectedLegends = {};\n const initialSelectedLegends = props.selectedLegends ?? props.defaultSelectedLegends;\n const initialSelectedLegend = props.selectedLegend ?? props.defaultSelectedLegend;\n let selectedLegendsState = {};\n\n if (props.canSelectMultipleLegends) {\n selectedLegendsState =\n (initialSelectedLegends ?? [])?.reduce(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (combineDict: any, key: any) => ({ [key]: true, ...combineDict }),\n {},\n ) || {};\n } else if (initialSelectedLegend) {\n selectedLegendsState = { [initialSelectedLegend]: true };\n }\n\n this.state = {\n activeLegend: '',\n isHoverCardVisible: false,\n selectedLegends: selectedLegendsState,\n };\n }\n\n public render(): JSX.Element {\n const { theme, className, styles } = this.props;\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n this._isLegendSelected = Object.keys(this.state.selectedLegends).length > 0;\n const dataToRender = this._generateData();\n return (\n <div className={this._classNames.root} ref={el => (this._rootElem = el)}>\n {this.props.enabledWrapLines ? (\n this._onRenderData(dataToRender)\n ) : (\n <ResizeGroup\n data={dataToRender}\n onReduceData={this._onReduceData}\n onRenderData={this._onRenderData}\n onGrowData={this._onGrowData}\n />\n )}\n </div>\n );\n }\n\n public toSVG = (svgWidth: number, isRTL: boolean = false) => {\n return cloneLegendsToSVG(\n this.props.legends,\n svgWidth,\n {\n selectedLegends: this.state.selectedLegends,\n centerLegends: !!this.props.centerLegends,\n textClassName: this._classNames.text,\n isRTL,\n },\n this._rootElem,\n );\n };\n\n private _generateData(): ILegendOverflowData {\n const { allowFocusOnLegends = true, shape } = this.props;\n const dataItems: ILegendItem[] = this.props.legends.map((legend: ILegend, index: number) => {\n return {\n ...(allowFocusOnLegends && {\n nativeButtonProps: getNativeProps<React.HTMLAttributes<HTMLButtonElement>>(legend, buttonProperties, [\n 'title',\n ]),\n 'aria-setsize': this.props.legends.length,\n 'aria-posinset': index + 1,\n }),\n title: legend.title,\n action: legend.action!,\n hoverAction: legend.hoverAction!,\n onMouseOutAction: legend.onMouseOutAction!,\n color: legend.color,\n shape: shape ? shape : legend.shape,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n key: index,\n };\n });\n const result: ILegendOverflowData = {\n primary: dataItems,\n overflow: [],\n };\n return result;\n }\n\n private _onRenderData = (data: IOverflowSetItemProps | ILegendOverflowData): JSX.Element => {\n const { overflowProps, allowFocusOnLegends = true, canSelectMultipleLegends = false } = this.props;\n const rootStyles = {\n root: {\n justifyContent: this.props.centerLegends ? 'center' : 'unset',\n flexWrap: 'wrap',\n },\n };\n return (\n <FocusZone\n {...(allowFocusOnLegends && {\n role: 'listbox',\n 'aria-label': 'Legends',\n 'aria-multiselectable': canSelectMultipleLegends,\n })}\n >\n <OverflowSet\n items={data.primary}\n overflowItems={data.overflow}\n onRenderItem={this._renderButton}\n onRenderOverflowButton={this._renderOverflowItems}\n {...overflowProps}\n styles={{ ...rootStyles, ...overflowProps?.styles }}\n />\n </FocusZone>\n );\n };\n\n private _onReduceData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.primary.length === 0) {\n return;\n }\n const overflow = [...currentdata.primary.slice(-1), ...currentdata.overflow];\n const primary = currentdata.primary.slice(0, -1);\n return { primary, overflow };\n };\n\n private _onGrowData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.overflow.length === 0) {\n return;\n }\n const overflow = currentdata.overflow.slice(1);\n const primary = [...currentdata.primary, ...currentdata.overflow.slice(0, 1)];\n return { primary, overflow };\n };\n\n /**\n * Get the new selected legends based on the legend that was clicked when multi-select is enabled.\n * @param legend The legend that was clicked\n * @returns An object with the new selected legend(s) state data.\n */\n private _getNewSelectedLegendsForMultiselect = (legend: ILegend): { [key: string]: boolean } => {\n let selectedLegends = { ...this.state.selectedLegends };\n if (selectedLegends[legend.title]) {\n // Delete entry for the deselected legend to make\n // the number of keys equal to the number of selected legends\n delete selectedLegends[legend.title];\n } else {\n selectedLegends[legend.title] = true;\n // Clear set if all legends are selected\n if (Object.keys(selectedLegends).length === this.props.legends.length) {\n selectedLegends = {};\n }\n }\n return selectedLegends;\n };\n\n /**\n * Get the new selected legends based on the legend that was clicked when single-select is enabled.\n * @param legend The legend that was clicked\n * @returns An object with the new selected legend state data.\n */\n\n private _getNewSelectedLegendsForSingleSelect = (legend: ILegend): { [key: string]: boolean } => {\n return this.state.selectedLegends[legend.title] ? {} : { [legend.title]: true };\n };\n\n private _onClick = (legend: ILegend, event: React.MouseEvent<HTMLButtonElement>): void => {\n const { canSelectMultipleLegends = false } = this.props;\n const nextSelectedLegends = canSelectMultipleLegends\n ? this._getNewSelectedLegendsForMultiselect(legend)\n : this._getNewSelectedLegendsForSingleSelect(legend);\n\n this.setState({ selectedLegends: nextSelectedLegends });\n this.props.onChange?.(Object.keys(nextSelectedLegends), event, legend);\n legend.action?.();\n };\n\n private _onRenderCompactCard = (expandingCard: IExpandingCardProps): JSX.Element => {\n const { allowFocusOnLegends = true, className, styles, theme, canSelectMultipleLegends = false } = this.props;\n const overflowHoverCardLegends: JSX.Element[] = [];\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n expandingCard.renderData.forEach((legend: IOverflowSetItemProps, index: number) => {\n const hoverCardElement = this._renderButton(legend, index, true);\n overflowHoverCardLegends.push(hoverCardElement);\n });\n const hoverCardData = (\n <FocusZone\n {...(allowFocusOnLegends && {\n role: 'listbox',\n 'aria-label': 'Legends',\n 'aria-multiselectable': canSelectMultipleLegends,\n })}\n direction={FocusZoneDirection.vertical}\n handleTabKey={FocusZoneTabbableElements.all}\n isCircularNavigation={true}\n {...this.props.focusZonePropsInHoverCard}\n className={classNames.hoverCardRoot}\n >\n {overflowHoverCardLegends}\n </FocusZone>\n );\n return hoverCardData;\n };\n\n private _renderOverflowItems = (legends: ILegend[]) => {\n const { allowFocusOnLegends = true } = this.props;\n const items: IContextualMenuItem[] = [];\n legends.forEach((legend: ILegend, i: number) => {\n items.push({ key: i.toString(), name: legend.title, onClick: legend.action });\n });\n const renderOverflowData: IExpandingCardProps = { renderData: legends };\n const { theme, className, styles, overflowText } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n const plainCardProps = {\n onRenderPlainCard: this._onRenderCompactCard,\n renderData: renderOverflowData,\n };\n\n const overflowString = overflowText ? overflowText : 'more';\n // execute similar to \"_onClick\" and \"_onLeave\" logic at HoverCard onCardHide event\n const onHoverCardHideHandler = () => {\n this.setState({ isHoverCardVisible: false });\n // Unhighlight the focused legend in the hover card\n const activeOverflowItem = find(legends, (legend: ILegend) => legend.title === this.state.activeLegend);\n if (activeOverflowItem) {\n this.setState({ activeLegend: '' });\n if (activeOverflowItem.onMouseOutAction) {\n activeOverflowItem.onMouseOutAction();\n }\n }\n };\n return (\n <HoverCard\n type={HoverCardType.plain}\n plainCardProps={plainCardProps}\n instantOpenOnClick={true}\n // eslint-disable-next-line react/jsx-no-bind\n onCardHide={onHoverCardHideHandler}\n setInitialFocus={true}\n trapFocus={true}\n onCardVisible={this._hoverCardVisible}\n styles={classNames.subComponentStyles.hoverCardStyles}\n cardDismissDelay={300}\n target={this._hoverCardRef}\n >\n {/* \"button\" role is not allowed as a child of parent role \"listbox\" */}\n <div role=\"option\">\n <div\n className={classNames.overflowIndicationTextStyle}\n ref={(rootElem: HTMLDivElement) => (this._hoverCardRef = rootElem)}\n {...(allowFocusOnLegends && {\n role: 'button',\n 'aria-expanded': this.state.isHoverCardVisible,\n 'aria-label': `${items.length} ${overflowString}`,\n })}\n data-is-focusable={allowFocusOnLegends}\n >\n {items.length} {overflowString}\n </div>\n </div>\n </HoverCard>\n );\n };\n\n private _hoverCardVisible = () => {\n this.setState({ isHoverCardVisible: true });\n };\n\n private _onHoverOverLegend = (legend: ILegend) => {\n if (legend.hoverAction) {\n this.setState({ activeLegend: legend.title });\n legend.hoverAction();\n }\n };\n\n private _onLeave = (legend: ILegend) => {\n if (legend.onMouseOutAction) {\n this.setState({ activeLegend: '' });\n legend.onMouseOutAction();\n }\n };\n\n private _renderButton = (data: IOverflowSetItemProps, index?: number, overflow?: boolean) => {\n const { allowFocusOnLegends = true } = this.props;\n const legend: ILegend = {\n title: data.title,\n color: data.color,\n shape: data.shape,\n action: data.action,\n hoverAction: data.hoverAction,\n onMouseOutAction: data.onMouseOutAction,\n stripePattern: data.stripePattern,\n isLineLegendInBarChart: data.isLineLegendInBarChart,\n opacity: data.opacity,\n };\n const color = this._getColor(legend.title, legend.color);\n const { theme, className, styles } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n colorOnSelectedState: color,\n borderColor: legend.color,\n overflow,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n });\n const onClickHandler = (event: React.MouseEvent<HTMLButtonElement>) => {\n this._onClick(legend, event);\n };\n const onHoverHandler = () => {\n this._onHoverOverLegend(legend);\n };\n const onMouseOut = () => {\n this._onLeave(legend);\n };\n const shape = this._getShape(classNames, legend, color);\n return (\n <button\n {...(allowFocusOnLegends && {\n 'aria-selected': !!this.state.selectedLegends[legend.title],\n role: 'option',\n 'aria-label': `${legend.title}`,\n 'aria-setsize': data['aria-setsize'],\n 'aria-posinset': data['aria-posinset'],\n })}\n {...(data.nativeButtonProps && { ...data.nativeButtonProps })}\n key={index}\n className={classNames.legend}\n onClick={onClickHandler}\n onMouseOver={onHoverHandler}\n onMouseOut={onMouseOut}\n onFocus={onHoverHandler}\n onBlur={onMouseOut}\n data-is-focusable={allowFocusOnLegends}\n /* eslint-enable react/jsx-no-bind */\n >\n {shape}\n <div className={classNames.text}>{legend.title}</div>\n </button>\n );\n };\n\n private _getShape(\n classNames: IProcessedStyleSet<ILegendsStyles>,\n legend: ILegend,\n color: string,\n ): React.ReactNode | string {\n const svgParentProps: React.SVGAttributes<SVGElement> = {\n className: classNames.shape,\n };\n const svgChildProps: React.SVGAttributes<SVGElement> = {\n fill: color,\n strokeWidth: 2,\n stroke: legend.color,\n };\n return (\n <Shape\n svgProps={svgParentProps}\n pathProps={svgChildProps}\n shape={legend.shape as LegendShape}\n classNameForNonSvg={classNames.rect}\n />\n );\n }\n\n private _getColor(title: string, color: string): string {\n const { theme } = this.props;\n let legendColor = color;\n // if one or more legends are selected\n if (this._isLegendSelected) {\n // if the given legend (title) is one of the selected legends\n if (this.state.selectedLegends[title]) {\n legendColor = color;\n }\n // if the given legend is unselected\n else {\n legendColor = theme!.semanticColors.buttonBackground;\n }\n }\n // if no legend is selected\n else {\n // if the given legend is hovered\n // or none of the legends is hovered\n if (this.state.activeLegend === title || this.state.activeLegend === '') {\n legendColor = color;\n }\n // if there is a hovered legend but the given legend is not the one\n else {\n legendColor = theme!.semanticColors.buttonBackground;\n }\n }\n return legendColor;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Legends.base.js","sourceRoot":"../src/","sources":["components/Legends/Legends.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAG/B,2DAA8F;AAC9F,2DAA2G;AAC3G,+DAA8D;AAE9D,+DAAqF;AACrF,qDAAiG;AAUjG,iCAAgC;AAChC,yEAAuE;AAEvE,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAqC,CAAC;AAuB9E;IAAiC,uCAA4C;IA+B3E,qBAAmB,KAAoB;;;QACrC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;QA7Bf,oEAAoE;QAC5D,uBAAiB,GAAG,KAAK,CAAC;QA6E3B,WAAK,GAAG,UAAC,QAAgB,EAAE,KAAsB;YAAtB,sBAAA,EAAA,aAAsB;YACtD,OAAO,IAAA,sCAAiB,EACtB,KAAI,CAAC,KAAK,CAAC,OAAO,EAClB,QAAQ,EACR;gBACE,eAAe,EAAE,KAAI,CAAC,KAAK,CAAC,eAAe;gBAC3C,aAAa,EAAE,CAAC,CAAC,KAAI,CAAC,KAAK,CAAC,aAAa;gBACzC,aAAa,EAAE,KAAI,CAAC,WAAW,CAAC,IAAI;gBACpC,KAAK,OAAA;aACN,EACD,KAAI,CAAC,SAAS,CACf,CAAC;QACJ,CAAC,CAAC;QAgCF,4DAA4D;QACpD,mBAAa,GAAG,UAAC,IAAiD;YAClE,IAAA,KAAkF,KA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Ac,CAAC,gBAAgB,CAAC;YACvD,CAAC;QACH,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IACH,kBAAC;AAAD,CAAC,AAvbD,CAAiC,KAAK,CAAC,SAAS,GAub/C;AAvbY,kCAAW","sourcesContent":["import * as React from 'react';\n\nimport { IContextualMenuItem } from '@fluentui/react/lib/ContextualMenu';\nimport { HoverCard, HoverCardType, IExpandingCardProps } from '@fluentui/react/lib/HoverCard';\nimport { classNamesFunction, find, getNativeProps, buttonProperties } from '@fluentui/react/lib/Utilities';\nimport { ResizeGroup } from '@fluentui/react/lib/ResizeGroup';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { OverflowSet, IOverflowSetItemProps } from '@fluentui/react/lib/OverflowSet';\nimport { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from '@fluentui/react-focus';\nimport {\n ILegend,\n ILegendsProps,\n LegendShape,\n ILegendsStyles,\n ILegendStyleProps,\n ILegendOverflowData,\n ILegendContainer,\n} from './Legends.types';\nimport { Shape } from './shape';\nimport { cloneLegendsToSVG } from '../../utilities/image-export-utils';\n\nconst getClassNames = classNamesFunction<ILegendStyleProps, ILegendsStyles>();\n\n// This is an internal interface used for rendering the legends with unique key\ninterface ILegendItem extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n name?: string;\n title: string;\n action: VoidFunction;\n hoverAction: VoidFunction;\n onMouseOutAction: VoidFunction;\n color: string;\n shape?: LegendShape;\n key: number;\n opacity?: number;\n stripePattern?: boolean;\n isLineLegendInBarChart?: boolean;\n}\n\nexport interface ILegendState {\n activeLegend: string;\n isHoverCardVisible: boolean;\n /** Set of legends selected, both for multiple selection and single selection */\n selectedLegends: { [key: string]: boolean };\n}\nexport class LegendsBase extends React.Component<ILegendsProps, ILegendState> implements ILegendContainer {\n private _hoverCardRef: HTMLDivElement;\n private _classNames: IProcessedStyleSet<ILegendsStyles>;\n /** Boolean variable to check if one or more legends are selected */\n private _isLegendSelected = false;\n private _rootElem: HTMLDivElement | null;\n\n public static getDerivedStateFromProps(newProps: ILegendsProps, prevState: ILegendState): ILegendState {\n const { selectedLegend, selectedLegends } = newProps;\n\n if (newProps.canSelectMultipleLegends && selectedLegends !== undefined) {\n return {\n ...prevState,\n selectedLegends: selectedLegends.reduce(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (combinedDict: any, key: any) => ({ [key]: true, ...combinedDict }),\n {},\n ),\n };\n }\n\n if (!newProps.canSelectMultipleLegends && selectedLegend !== undefined) {\n return {\n ...prevState,\n selectedLegends: { [selectedLegend]: true },\n };\n }\n\n return prevState;\n }\n\n public constructor(props: ILegendsProps) {\n super(props);\n //let defaultSelectedLegends = {};\n const initialSelectedLegends = props.selectedLegends ?? props.defaultSelectedLegends;\n const initialSelectedLegend = props.selectedLegend ?? props.defaultSelectedLegend;\n let selectedLegendsState = {};\n\n if (props.canSelectMultipleLegends) {\n selectedLegendsState =\n (initialSelectedLegends ?? [])?.reduce(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (combineDict: any, key: any) => ({ [key]: true, ...combineDict }),\n {},\n ) || {};\n } else if (initialSelectedLegend) {\n selectedLegendsState = { [initialSelectedLegend]: true };\n }\n\n this.state = {\n activeLegend: '',\n isHoverCardVisible: false,\n selectedLegends: selectedLegendsState,\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public render(): JSX.Element {\n const { theme, className, styles } = this.props;\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n this._isLegendSelected = Object.keys(this.state.selectedLegends).length > 0;\n const dataToRender = this._generateData();\n return (\n <div className={this._classNames.root} ref={el => (this._rootElem = el)}>\n {this.props.enabledWrapLines ? (\n this._onRenderData(dataToRender)\n ) : (\n <ResizeGroup\n data={dataToRender}\n onReduceData={this._onReduceData}\n onRenderData={this._onRenderData}\n onGrowData={this._onGrowData}\n />\n )}\n </div>\n );\n }\n\n public toSVG = (svgWidth: number, isRTL: boolean = false) => {\n return cloneLegendsToSVG(\n this.props.legends,\n svgWidth,\n {\n selectedLegends: this.state.selectedLegends,\n centerLegends: !!this.props.centerLegends,\n textClassName: this._classNames.text,\n isRTL,\n },\n this._rootElem,\n );\n };\n\n private _generateData(): ILegendOverflowData {\n const { allowFocusOnLegends = true, shape } = this.props;\n const dataItems: ILegendItem[] = this.props.legends.map((legend: ILegend, index: number) => {\n return {\n ...(allowFocusOnLegends && {\n nativeButtonProps: getNativeProps<React.HTMLAttributes<HTMLButtonElement>>(legend, buttonProperties, [\n 'title',\n ]),\n 'aria-setsize': this.props.legends.length,\n 'aria-posinset': index + 1,\n }),\n title: legend.title,\n action: legend.action!,\n hoverAction: legend.hoverAction!,\n onMouseOutAction: legend.onMouseOutAction!,\n color: legend.color,\n shape: shape ? shape : legend.shape,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n key: index,\n };\n });\n const result: ILegendOverflowData = {\n primary: dataItems,\n overflow: [],\n };\n return result;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _onRenderData = (data: IOverflowSetItemProps | ILegendOverflowData): JSX.Element => {\n const { overflowProps, allowFocusOnLegends = true, canSelectMultipleLegends = false } = this.props;\n const rootStyles = {\n root: {\n justifyContent: this.props.centerLegends ? 'center' : 'unset',\n flexWrap: this.props.enabledWrapLines ? 'wrap' : 'nowrap',\n },\n };\n return (\n <FocusZone\n {...(allowFocusOnLegends && {\n role: 'listbox',\n 'aria-label': 'Legends',\n 'aria-multiselectable': canSelectMultipleLegends,\n })}\n >\n <OverflowSet\n items={data.primary}\n overflowItems={data.overflow}\n onRenderItem={this._renderButton}\n onRenderOverflowButton={this._renderOverflowItems}\n {...overflowProps}\n styles={{ ...rootStyles, ...overflowProps?.styles }}\n />\n </FocusZone>\n );\n };\n\n private _onReduceData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.primary.length === 0) {\n return;\n }\n const overflow = [...currentdata.primary.slice(-1), ...currentdata.overflow];\n const primary = currentdata.primary.slice(0, -1);\n return { primary, overflow };\n };\n\n private _onGrowData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.overflow.length === 0) {\n return;\n }\n const overflow = currentdata.overflow.slice(1);\n const primary = [...currentdata.primary, ...currentdata.overflow.slice(0, 1)];\n return { primary, overflow };\n };\n\n /**\n * Get the new selected legends based on the legend that was clicked when multi-select is enabled.\n * @param legend The legend that was clicked\n * @returns An object with the new selected legend(s) state data.\n */\n private _getNewSelectedLegendsForMultiselect = (legend: ILegend): { [key: string]: boolean } => {\n let selectedLegends = { ...this.state.selectedLegends };\n if (selectedLegends[legend.title]) {\n // Delete entry for the deselected legend to make\n // the number of keys equal to the number of selected legends\n delete selectedLegends[legend.title];\n } else {\n selectedLegends[legend.title] = true;\n // Clear set if all legends are selected\n if (Object.keys(selectedLegends).length === this.props.legends.length) {\n selectedLegends = {};\n }\n }\n return selectedLegends;\n };\n\n /**\n * Get the new selected legends based on the legend that was clicked when single-select is enabled.\n * @param legend The legend that was clicked\n * @returns An object with the new selected legend state data.\n */\n\n private _getNewSelectedLegendsForSingleSelect = (legend: ILegend): { [key: string]: boolean } => {\n return this.state.selectedLegends[legend.title] ? {} : { [legend.title]: true };\n };\n\n private _onClick = (legend: ILegend, event: React.MouseEvent<HTMLButtonElement>): void => {\n const { canSelectMultipleLegends = false } = this.props;\n const nextSelectedLegends = canSelectMultipleLegends\n ? this._getNewSelectedLegendsForMultiselect(legend)\n : this._getNewSelectedLegendsForSingleSelect(legend);\n\n this.setState({ selectedLegends: nextSelectedLegends });\n this.props.onChange?.(Object.keys(nextSelectedLegends), event, legend);\n legend.action?.();\n };\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _onRenderCompactCard = (expandingCard: IExpandingCardProps): JSX.Element => {\n const { allowFocusOnLegends = true, className, styles, theme, canSelectMultipleLegends = false } = this.props;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const overflowHoverCardLegends: JSX.Element[] = [];\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n expandingCard.renderData.forEach((legend: IOverflowSetItemProps, index: number) => {\n const hoverCardElement = this._renderButton(legend, index, true);\n overflowHoverCardLegends.push(hoverCardElement);\n });\n const hoverCardData = (\n <FocusZone\n {...(allowFocusOnLegends && {\n role: 'listbox',\n 'aria-label': 'Legends',\n 'aria-multiselectable': canSelectMultipleLegends,\n })}\n direction={FocusZoneDirection.vertical}\n handleTabKey={FocusZoneTabbableElements.all}\n isCircularNavigation={true}\n {...this.props.focusZonePropsInHoverCard}\n className={classNames.hoverCardRoot}\n >\n {overflowHoverCardLegends}\n </FocusZone>\n );\n return hoverCardData;\n };\n\n private _renderOverflowItems = (legends: ILegend[]) => {\n const { allowFocusOnLegends = true } = this.props;\n const items: IContextualMenuItem[] = [];\n legends.forEach((legend: ILegend, i: number) => {\n items.push({ key: i.toString(), name: legend.title, onClick: legend.action });\n });\n const renderOverflowData: IExpandingCardProps = { renderData: legends };\n const { theme, className, styles, overflowText } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n const plainCardProps = {\n onRenderPlainCard: this._onRenderCompactCard,\n renderData: renderOverflowData,\n };\n\n const overflowString = overflowText ? overflowText : 'more';\n // execute similar to \"_onClick\" and \"_onLeave\" logic at HoverCard onCardHide event\n const onHoverCardHideHandler = () => {\n this.setState({ isHoverCardVisible: false });\n // Unhighlight the focused legend in the hover card\n const activeOverflowItem = find(legends, (legend: ILegend) => legend.title === this.state.activeLegend);\n if (activeOverflowItem) {\n this.setState({ activeLegend: '' });\n if (activeOverflowItem.onMouseOutAction) {\n activeOverflowItem.onMouseOutAction();\n }\n }\n };\n return (\n <HoverCard\n type={HoverCardType.plain}\n plainCardProps={plainCardProps}\n instantOpenOnClick={true}\n // eslint-disable-next-line react/jsx-no-bind\n onCardHide={onHoverCardHideHandler}\n setInitialFocus={true}\n trapFocus={true}\n onCardVisible={this._hoverCardVisible}\n styles={classNames.subComponentStyles.hoverCardStyles}\n cardDismissDelay={300}\n target={this._hoverCardRef}\n >\n {/* \"button\" role is not allowed as a child of parent role \"listbox\" */}\n <div role=\"option\">\n <div\n className={classNames.overflowIndicationTextStyle}\n ref={(rootElem: HTMLDivElement) => (this._hoverCardRef = rootElem)}\n {...(allowFocusOnLegends && {\n role: 'button',\n 'aria-expanded': this.state.isHoverCardVisible,\n 'aria-label': `${items.length} ${overflowString}`,\n })}\n data-is-focusable={allowFocusOnLegends}\n >\n {items.length} {overflowString}\n </div>\n </div>\n </HoverCard>\n );\n };\n\n private _hoverCardVisible = () => {\n this.setState({ isHoverCardVisible: true });\n };\n\n private _onHoverOverLegend = (legend: ILegend) => {\n if (legend.hoverAction) {\n this.setState({ activeLegend: legend.title });\n legend.hoverAction();\n }\n };\n\n private _onLeave = (legend: ILegend) => {\n if (legend.onMouseOutAction) {\n this.setState({ activeLegend: '' });\n legend.onMouseOutAction();\n }\n };\n\n private _renderButton = (data: IOverflowSetItemProps, index?: number, overflow?: boolean) => {\n const { allowFocusOnLegends = true } = this.props;\n const legend: ILegend = {\n title: data.title,\n color: data.color,\n shape: data.shape,\n action: data.action,\n hoverAction: data.hoverAction,\n onMouseOutAction: data.onMouseOutAction,\n stripePattern: data.stripePattern,\n isLineLegendInBarChart: data.isLineLegendInBarChart,\n opacity: data.opacity,\n };\n const color = this._getColor(legend.title, legend.color);\n const { theme, className, styles } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n colorOnSelectedState: color,\n borderColor: legend.color,\n overflow,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n });\n const onClickHandler = (event: React.MouseEvent<HTMLButtonElement>) => {\n this._onClick(legend, event);\n };\n const onHoverHandler = () => {\n this._onHoverOverLegend(legend);\n };\n const onMouseOut = () => {\n this._onLeave(legend);\n };\n const shape = this._getShape(classNames, legend, color);\n return (\n <button\n {...(allowFocusOnLegends && {\n 'aria-selected': !!this.state.selectedLegends[legend.title],\n role: 'option',\n 'aria-label': `${legend.title}`,\n 'aria-setsize': data['aria-setsize'],\n 'aria-posinset': data['aria-posinset'],\n })}\n {...(data.nativeButtonProps && { ...data.nativeButtonProps })}\n key={index}\n className={classNames.legend}\n onClick={onClickHandler}\n onMouseOver={onHoverHandler}\n onMouseOut={onMouseOut}\n onFocus={onHoverHandler}\n onBlur={onMouseOut}\n data-is-focusable={allowFocusOnLegends}\n /* eslint-enable react/jsx-no-bind */\n >\n {shape}\n <div className={classNames.text}>{legend.title}</div>\n </button>\n );\n };\n\n private _getShape(\n classNames: IProcessedStyleSet<ILegendsStyles>,\n legend: ILegend,\n color: string,\n ): React.ReactNode | string {\n const svgParentProps: React.SVGAttributes<SVGElement> = {\n className: classNames.shape,\n };\n const svgChildProps: React.SVGAttributes<SVGElement> = {\n fill: color,\n strokeWidth: 2,\n stroke: legend.color,\n };\n return (\n <Shape\n svgProps={svgParentProps}\n pathProps={svgChildProps}\n shape={legend.shape as LegendShape}\n classNameForNonSvg={classNames.rect}\n />\n );\n }\n\n private _getColor(title: string, color: string): string {\n const { theme } = this.props;\n let legendColor = color;\n // if one or more legends are selected\n if (this._isLegendSelected) {\n // if the given legend (title) is one of the selected legends\n if (this.state.selectedLegends[title]) {\n legendColor = color;\n }\n // if the given legend is unselected\n else {\n legendColor = theme!.semanticColors.buttonBackground;\n }\n }\n // if no legend is selected\n else {\n // if the given legend is hovered\n // or none of the legends is hovered\n if (this.state.activeLegend === title || this.state.activeLegend === '') {\n legendColor = color;\n }\n // if there is a hovered legend but the given legend is not the one\n else {\n legendColor = theme!.semanticColors.buttonBackground;\n }\n }\n return legendColor;\n }\n}\n"]}
|
|
@@ -52,6 +52,7 @@ export declare class LineChartBase extends React.Component<ILineChartProps, ILin
|
|
|
52
52
|
private _yPaddingSecondary;
|
|
53
53
|
private _hasMarkersMode;
|
|
54
54
|
private _isXAxisDateType;
|
|
55
|
+
private _isScatterPolar;
|
|
55
56
|
constructor(props: ILineChartProps);
|
|
56
57
|
componentDidUpdate(prevProps: ILineChartProps): void;
|
|
57
58
|
render(): JSX.Element;
|
|
@@ -15,6 +15,7 @@ var chart_utilities_1 = require("@fluentui/chart-utilities");
|
|
|
15
15
|
var EventAnnotation_1 = require("./eventAnnotation/EventAnnotation");
|
|
16
16
|
var index_3 = require("../../utilities/index");
|
|
17
17
|
var image_export_utils_1 = require("../../utilities/image-export-utils");
|
|
18
|
+
var scatterpolar_utils_1 = require("../../utilities/scatterpolar-utils");
|
|
18
19
|
var getClassNames = (0, Utilities_1.classNamesFunction)();
|
|
19
20
|
var PointSize;
|
|
20
21
|
(function (PointSize) {
|
|
@@ -72,6 +73,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
72
73
|
_this_1._yPaddingSecondary = 0;
|
|
73
74
|
_this_1._hasMarkersMode = false;
|
|
74
75
|
_this_1._isXAxisDateType = false;
|
|
76
|
+
_this_1._isScatterPolar = false;
|
|
75
77
|
_this_1.toImage = function (opts) {
|
|
76
78
|
var _a, _b;
|
|
77
79
|
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);
|
|
@@ -109,6 +111,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
109
111
|
: lineChartData;
|
|
110
112
|
_this_1._hasMarkersMode =
|
|
111
113
|
(_a = filteredData === null || filteredData === void 0 ? void 0 : filteredData.some(function (item) { var _a, _b, _c; return (_c = (_b = (_a = item.lineOptions) === null || _a === void 0 ? void 0 : _a.mode) === null || _b === void 0 ? void 0 : _b.includes) === null || _c === void 0 ? void 0 : _c.call(_b, 'markers'); })) !== null && _a !== void 0 ? _a : false;
|
|
114
|
+
_this_1._isScatterPolar = (0, index_3.isScatterPolarSeries)(filteredData);
|
|
112
115
|
return filteredData
|
|
113
116
|
? filteredData.map(function (item, index) {
|
|
114
117
|
var _a, _b;
|
|
@@ -244,6 +247,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
244
247
|
};
|
|
245
248
|
_this_1._createColorFillBars = function (containerHeight) {
|
|
246
249
|
var _a;
|
|
250
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
247
251
|
var colorFillBars = [];
|
|
248
252
|
if (_this_1.state.isSelectedLegend) {
|
|
249
253
|
_this_1._colorFillBars = _this_1.state.selectedColorBarLegend;
|
|
@@ -425,6 +429,16 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
425
429
|
var yVal = y instanceof Date ? y.getTime() : y;
|
|
426
430
|
var _this = _this_1;
|
|
427
431
|
var found = (0, Utilities_1.find)(_this_1._calloutPoints, function (element) { return element.x === xVal; });
|
|
432
|
+
var hoverDp = undefined;
|
|
433
|
+
if (_this_1.props.isCalloutForStack === false && (found === null || found === void 0 ? void 0 : found.values)) {
|
|
434
|
+
var dp = (0, Utilities_1.find)(found.values, function (val) { return (val === null || val === void 0 ? void 0 : val.y) === yVal; });
|
|
435
|
+
if (dp) {
|
|
436
|
+
hoverDp = {
|
|
437
|
+
x: xVal,
|
|
438
|
+
values: [dp],
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
}
|
|
428
442
|
// if no points need to be called out then don't show vertical line and callout card
|
|
429
443
|
if (found) {
|
|
430
444
|
(0, d3_selection_1.select)("#".concat(_this_1._verticalLine))
|
|
@@ -442,7 +456,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
442
456
|
legendVal: legendVal,
|
|
443
457
|
lineColor: lineColor,
|
|
444
458
|
stackCalloutProps: found,
|
|
445
|
-
dataPointCalloutProps:
|
|
459
|
+
dataPointCalloutProps: hoverDp,
|
|
446
460
|
activePoint: circleId,
|
|
447
461
|
xAxisCalloutAccessibilityData: xAxisCalloutAccessibilityData,
|
|
448
462
|
nearestCircleToHighlight: null,
|
|
@@ -725,6 +739,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
725
739
|
this._calloutPoints = (0, index_3.calloutData)(this._points) || [];
|
|
726
740
|
}
|
|
727
741
|
};
|
|
742
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
728
743
|
LineChartBase.prototype.render = function () {
|
|
729
744
|
var _this_1 = this;
|
|
730
745
|
var _a = this.props, tickValues = _a.tickValues, tickFormat = _a.tickFormat, eventAnnotationProps = _a.eventAnnotationProps, legendProps = _a.legendProps, data = _a.data;
|
|
@@ -749,7 +764,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
749
764
|
tickValues: tickValues,
|
|
750
765
|
tickFormat: tickFormat,
|
|
751
766
|
};
|
|
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,
|
|
767
|
+
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 }, (this._isScatterPolar ? { yMaxValue: 1, yMinValue: -1 } : {}), { customizedCallout: this._getCustomizedCallout(), getDomainNRangeValues: this._getDomainNRangeValues, createStringYAxis: index_3.createStringYAxis, onChartMouseLeave: this._handleChartMouseLeave, enableFirstRenderOptimization: this.props.enablePerfOptimization && this._firstRenderOptimization, ref: this._cartesianChartRef,
|
|
753
768
|
/* eslint-disable react/jsx-no-bind */
|
|
754
769
|
// eslint-disable-next-line react/no-children-prop
|
|
755
770
|
children: function (props) {
|
|
@@ -774,6 +789,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
774
789
|
enumerable: false,
|
|
775
790
|
configurable: true
|
|
776
791
|
});
|
|
792
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
777
793
|
LineChartBase.prototype._createLegends = function (data) {
|
|
778
794
|
var _this_1 = this;
|
|
779
795
|
var _a = this.props, legendProps = _a.legendProps, _b = _a.allowMultipleShapesForPoints, allowMultipleShapesForPoints = _b === void 0 ? false : _b;
|
|
@@ -850,9 +866,11 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
850
866
|
var extraYPixels = yScale(yMin) - yScale(yMin + yPadding);
|
|
851
867
|
return Math.min(extraXPixels, extraYPixels);
|
|
852
868
|
};
|
|
869
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
853
870
|
LineChartBase.prototype._createLines = function (xElement, containerHeight) {
|
|
854
871
|
var _this_1 = this;
|
|
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;
|
|
872
|
+
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, _17, _18;
|
|
873
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
856
874
|
var lines = [];
|
|
857
875
|
if (this.state.isSelectedLegend) {
|
|
858
876
|
this._points = this.state.selectedLegendPoints;
|
|
@@ -869,8 +887,11 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
869
887
|
theme: this.props.theme,
|
|
870
888
|
});
|
|
871
889
|
var _loop_1 = function (i) {
|
|
890
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
872
891
|
var linesForLine = [];
|
|
892
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
873
893
|
var bordersForLine = [];
|
|
894
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
874
895
|
var pointsForLine = [];
|
|
875
896
|
var legendVal = this_1._points[i].legend;
|
|
876
897
|
var lineColor = this_1._points[i].color;
|
|
@@ -881,7 +902,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
881
902
|
var yPadding = this_1._points[i].useSecondaryYScale && this_1._yScaleSecondary ? this_1._yPaddingSecondary : this_1._yPaddingPrimary;
|
|
882
903
|
var extraMaxPixels = this_1._hasMarkersMode ? this_1._getRangeForScatterMarkerSize(yScale, yPadding) : 0;
|
|
883
904
|
if (this_1._points[i].data.length === 1) {
|
|
884
|
-
var
|
|
905
|
+
var _19 = this_1._points[i].data[0], x1_1 = _19.x, y1 = _19.y, xAxisCalloutData_1 = _19.xAxisCalloutData, xAxisCalloutAccessibilityData_1 = _19.xAxisCalloutAccessibilityData;
|
|
885
906
|
var circleId_1 = "".concat(this_1._circleId, "_").concat(i);
|
|
886
907
|
var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
|
|
887
908
|
var currentMarkerSize = this_1._points[i].data[0].markerSize;
|
|
@@ -895,7 +916,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
895
916
|
: 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
917
|
_this_1._refCallback(e, circleId_1);
|
|
897
918
|
}, 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) +
|
|
919
|
+
!this_1._isScatterPolar && supportsTextMode && text && (React.createElement("text", { key: "".concat(circleId_1, "-label"), x: this_1._xAxisScale(x1_1), y: yScale(y1) +
|
|
899
920
|
Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 3.5, 4) +
|
|
900
921
|
12, className: classNames.markerLabel, opacity: isLegendSelected ? 1 : 0.1 }, text))));
|
|
901
922
|
}
|
|
@@ -946,8 +967,8 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
946
967
|
var lineId = "".concat(this_1._lineId, "_").concat(i, "_").concat(j);
|
|
947
968
|
var borderId = "".concat(this_1._borderId, "_").concat(i, "_").concat(j);
|
|
948
969
|
var circleId = "".concat(this_1._circleId, "_").concat(i, "_").concat(j);
|
|
949
|
-
var
|
|
950
|
-
var
|
|
970
|
+
var _20 = this_1._points[i].data[j - 1], x1 = _20.x, y1 = _20.y, xAxisCalloutData = _20.xAxisCalloutData, xAxisCalloutAccessibilityData = _20.xAxisCalloutAccessibilityData;
|
|
971
|
+
var _21 = this_1._points[i].data[j], x2 = _21.x, y2 = _21.y;
|
|
951
972
|
var path = this_1._getPath(this_1._xAxisScale(x1), yScale(y1), circleId, j, false, this_1._points[i].index);
|
|
952
973
|
var strokeWidth = ((_s = this_1._points[i].lineOptions) === null || _s === void 0 ? void 0 : _s.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
|
|
953
974
|
var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
|
|
@@ -959,7 +980,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
959
980
|
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 () {
|
|
960
981
|
return _this_1._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData);
|
|
961
982
|
}, 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) +
|
|
983
|
+
!this_1._isScatterPolar && supportsTextMode && text && (React.createElement("text", { key: "".concat(circleId, "-label"), x: this_1._xAxisScale(x1), y: yScale(y1) +
|
|
963
984
|
Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, 4) +
|
|
964
985
|
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) }))));
|
|
965
986
|
if (j + 1 === this_1._points[i].data.length) {
|
|
@@ -968,7 +989,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
968
989
|
var hiddenHoverCircleId = "".concat(circleId).concat(j, "D");
|
|
969
990
|
var lastPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== lastCircleId_1;
|
|
970
991
|
path = this_1._getPath(this_1._xAxisScale(x2), yScale(y2), lastCircleId_1, j, true, this_1._points[i].index);
|
|
971
|
-
var
|
|
992
|
+
var _22 = this_1._points[i].data[j], lastCirlceXCallout_1 = _22.xAxisCalloutData, lastCirlceXCalloutAccessibilityData_1 = _22.xAxisCalloutAccessibilityData;
|
|
972
993
|
currentMarkerSize = this_1._points[i].data[j].markerSize;
|
|
973
994
|
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
995
|
var lastText = this_1._points[i].data[j].text;
|
|
@@ -977,7 +998,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
977
998
|
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 () {
|
|
978
999
|
return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
|
|
979
1000
|
}, 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) +
|
|
1001
|
+
!this_1._isScatterPolar && lastSupportsTextMode && lastText && (React.createElement("text", { key: "".concat(lastCircleId_1, "-label"), x: this_1._xAxisScale(x2), y: yScale(y2) +
|
|
981
1002
|
Math.max(currentMarkerSize ? (currentMarkerSize * extraMaxPixels) / maxMarkerSize : 4, 4) +
|
|
982
1003
|
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 () {
|
|
983
1004
|
return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
|
|
@@ -1010,6 +1031,26 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
1010
1031
|
_loop_2(j);
|
|
1011
1032
|
}
|
|
1012
1033
|
}
|
|
1034
|
+
if (this_1._isScatterPolar) {
|
|
1035
|
+
// Render category labels for all series at once to avoid overlap
|
|
1036
|
+
var allSeriesData = this_1._points.map(function (series) { return ({
|
|
1037
|
+
data: series.data
|
|
1038
|
+
.filter(function (pt) { return typeof pt.x === 'number' && typeof pt.y === 'number'; })
|
|
1039
|
+
.map(function (pt) { return ({ x: pt.x, y: pt.y, text: pt.text }); }),
|
|
1040
|
+
}); });
|
|
1041
|
+
pointsForLine.push.apply(pointsForLine, (0, scatterpolar_utils_1.renderScatterPolarCategoryLabels)({
|
|
1042
|
+
allSeriesData: allSeriesData,
|
|
1043
|
+
xAxisScale: this_1._xAxisScale,
|
|
1044
|
+
yAxisScale: yScale,
|
|
1045
|
+
className: classNames.markerLabel || '',
|
|
1046
|
+
maybeLineOptions: ((_17 = this_1._points[i]) === null || _17 === void 0 ? void 0 : _17.lineOptions)
|
|
1047
|
+
? {
|
|
1048
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1049
|
+
originXOffset: (_18 = this_1._points[i].lineOptions) === null || _18 === void 0 ? void 0 : _18.originXOffset,
|
|
1050
|
+
}
|
|
1051
|
+
: undefined,
|
|
1052
|
+
}));
|
|
1053
|
+
}
|
|
1013
1054
|
lines.push(React.createElement("g", { key: "line_".concat(i), role: "region", "aria-label": "".concat(legendVal, ", line ").concat(i + 1, " of ").concat(this_1._points.length, " with ").concat(this_1._points[i].data.length, " data points.") },
|
|
1014
1055
|
bordersForLine,
|
|
1015
1056
|
linesForLine,
|
|
@@ -1056,7 +1097,7 @@ var LineChartBase = /** @class */ (function (_super) {
|
|
|
1056
1097
|
LineChartBase.defaultProps = {
|
|
1057
1098
|
enableReflow: true,
|
|
1058
1099
|
useUTC: true,
|
|
1059
|
-
isCalloutForStack:
|
|
1100
|
+
isCalloutForStack: true,
|
|
1060
1101
|
};
|
|
1061
1102
|
return LineChartBase;
|
|
1062
1103
|
}(React.Component));
|