@fluentui/react-charts 0.0.0-nightly-20260109-0406.1 → 0.0.0-nightly-20260113-0406.1
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.md +13 -13
- package/dist/index.d.ts +361 -0
- package/lib/PolarChart.js +1 -0
- package/lib/PolarChart.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +2 -1
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.js +21 -7
- package/lib/components/ChartTable/ChartTable.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.js +24 -3
- package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +14 -2
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +7 -5
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +47 -3
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +24 -17
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +5 -3
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +33 -29
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +250 -153
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.js +12 -4
- package/lib/components/DonutChart/DonutChart.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +25 -5
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +16 -5
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.js +27 -5
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +26 -4
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +15 -3
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js +5 -5
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +8 -5
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +2 -5
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +4 -1
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/PolarChart/PolarChart.js +576 -0
- package/lib/components/PolarChart/PolarChart.js.map +1 -0
- package/lib/components/PolarChart/PolarChart.types.js +1 -0
- package/lib/components/PolarChart/PolarChart.types.js.map +1 -0
- package/lib/components/PolarChart/PolarChart.utils.js +174 -0
- package/lib/components/PolarChart/PolarChart.utils.js.map +1 -0
- package/lib/components/PolarChart/index.js +2 -0
- package/lib/components/PolarChart/index.js.map +1 -0
- package/lib/components/PolarChart/usePolarChartStyles.styles.js +72 -0
- package/lib/components/PolarChart/usePolarChartStyles.styles.js.map +1 -0
- package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js +61 -0
- package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js.map +1 -0
- package/lib/components/SankeyChart/SankeyChart.js +13 -3
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +23 -6
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +15 -5
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +25 -36
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/DataPoint.js +1 -1
- package/lib/types/DataPoint.js.map +1 -1
- package/lib/utilities/ChartTitle.js +33 -0
- package/lib/utilities/ChartTitle.js.map +1 -0
- package/lib/utilities/Common.styles.js +73 -1
- package/lib/utilities/Common.styles.js.map +1 -1
- package/lib/utilities/Common.styles.raw.js +70 -0
- package/lib/utilities/Common.styles.raw.js.map +1 -1
- package/lib/utilities/index.js +1 -0
- package/lib/utilities/index.js.map +1 -1
- package/lib/utilities/utilities.js +2 -2
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/PolarChart.js +6 -0
- package/lib-commonjs/PolarChart.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +2 -1
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.js +21 -7
- package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +34 -3
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +14 -2
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +7 -5
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +58 -4
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +24 -17
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +4 -2
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +59 -56
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +256 -156
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +11 -3
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +31 -4
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +15 -4
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +26 -4
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +36 -4
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +15 -3
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +4 -4
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +10 -4
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +2 -5
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +4 -1
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/PolarChart/PolarChart.js +586 -0
- package/lib-commonjs/components/PolarChart/PolarChart.js.map +1 -0
- package/lib-commonjs/components/PolarChart/PolarChart.types.js +6 -0
- package/lib-commonjs/components/PolarChart/PolarChart.types.js.map +1 -0
- package/lib-commonjs/components/PolarChart/PolarChart.utils.js +204 -0
- package/lib-commonjs/components/PolarChart/PolarChart.utils.js.map +1 -0
- package/lib-commonjs/components/PolarChart/index.js +7 -0
- package/lib-commonjs/components/PolarChart/index.js.map +1 -0
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js +107 -0
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js +75 -0
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +13 -3
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +28 -4
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +14 -3
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +25 -36
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/DataPoint.js +1 -1
- package/lib-commonjs/types/DataPoint.js.map +1 -1
- package/lib-commonjs/utilities/ChartTitle.js +41 -0
- package/lib-commonjs/utilities/ChartTitle.js.map +1 -0
- package/lib-commonjs/utilities/Common.styles.js +69 -0
- package/lib-commonjs/utilities/Common.styles.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.raw.js +69 -0
- package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
- package/lib-commonjs/utilities/index.js +1 -0
- package/lib-commonjs/utilities/index.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +6 -0
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +10 -10
|
@@ -27,7 +27,9 @@ const sankeyChartClassNames = {
|
|
|
27
27
|
nodeTextContainer: 'fui-sc__nodeTextContainer',
|
|
28
28
|
toolTip: 'fui-sc__toolTip',
|
|
29
29
|
chartWrapper: 'fui-sc__chartWrapper',
|
|
30
|
-
chart: 'fui-sc__chart'
|
|
30
|
+
chart: 'fui-sc__chart',
|
|
31
|
+
chartTitle: 'fui-sc__chartTitle',
|
|
32
|
+
svgTooltip: 'fui-sc__svgTooltip'
|
|
31
33
|
};
|
|
32
34
|
const useStyles = (0, _react.makeStyles)({
|
|
33
35
|
root: {
|
|
@@ -69,10 +71,17 @@ const useStyles = (0, _react.makeStyles)({
|
|
|
69
71
|
},
|
|
70
72
|
chart: {
|
|
71
73
|
display: 'block'
|
|
74
|
+
},
|
|
75
|
+
chartTitle: (0, _index.getChartTitleStyles)(),
|
|
76
|
+
svgTooltip: {
|
|
77
|
+
fill: _reacttheme.tokens.colorNeutralBackground1,
|
|
78
|
+
[_index.HighContrastSelector]: {
|
|
79
|
+
fill: 'Canvas'
|
|
80
|
+
}
|
|
72
81
|
}
|
|
73
82
|
});
|
|
74
83
|
const useSankeyChartStyles = (props)=>{
|
|
75
|
-
var _props_styles, _props_reflowProps, _props_styles1, _props_styles2;
|
|
84
|
+
var _props_styles, _props_reflowProps, _props_styles1, _props_styles2, _props_styles3, _props_styles4;
|
|
76
85
|
const baseStyles = useStyles();
|
|
77
86
|
return {
|
|
78
87
|
root: (0, _react.mergeClasses)(sankeyChartClassNames.root, baseStyles.root, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),
|
|
@@ -81,6 +90,8 @@ const useSankeyChartStyles = (props)=>{
|
|
|
81
90
|
nodeTextContainer: (0, _react.mergeClasses)(sankeyChartClassNames.nodeTextContainer, baseStyles.nodeTextContainer /*, props.styles?.nodeTextContainer*/ ),
|
|
82
91
|
toolTip: (0, _react.mergeClasses)(sankeyChartClassNames.toolTip, baseStyles.toolTip /*, props.styles?.toolTip*/ ),
|
|
83
92
|
chartWrapper: (0, _react.mergeClasses)(sankeyChartClassNames.chartWrapper, ((_props_reflowProps = props.reflowProps) === null || _props_reflowProps === void 0 ? void 0 : _props_reflowProps.mode) === 'min-width' ? baseStyles.chartWrapper : '', (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chartWrapper),
|
|
84
|
-
chart: (0, _react.mergeClasses)(sankeyChartClassNames.chart, baseStyles.chart, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.chart)
|
|
93
|
+
chart: (0, _react.mergeClasses)(sankeyChartClassNames.chart, baseStyles.chart, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.chart),
|
|
94
|
+
chartTitle: (0, _react.mergeClasses)(sankeyChartClassNames.chartTitle, baseStyles.chartTitle, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.chartTitle),
|
|
95
|
+
svgTooltip: (0, _react.mergeClasses)(sankeyChartClassNames.svgTooltip, baseStyles.svgTooltip, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.svgTooltip)
|
|
85
96
|
};
|
|
86
97
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/SankeyChart/useSankeyChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport type { SankeyChartProps, SankeyChartStyles } from './SankeyChart.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector
|
|
1
|
+
{"version":3,"sources":["../src/components/SankeyChart/useSankeyChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport type { SankeyChartProps, SankeyChartStyles } from './SankeyChart.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector, getTooltipStyle, getChartTitleStyles } from '../../utilities/index';\n\nexport const sankeyChartClassNames: SlotClassNames<SankeyChartStyles> = {\n root: 'fui-sc__root',\n nodes: 'fui-sc__nodes',\n links: 'fui-sc__links',\n nodeTextContainer: 'fui-sc__nodeTextContainer',\n toolTip: 'fui-sc__toolTip',\n chartWrapper: 'fui-sc__chartWrapper',\n chart: 'fui-sc__chart',\n chartTitle: 'fui-sc__chartTitle',\n svgTooltip: 'fui-sc__svgTooltip',\n};\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden',\n textAlign: 'left',\n },\n links: {\n fill: tokens.colorNeutralBackground1,\n strokeWidth: '3px',\n [HighContrastSelector]: {\n fill: 'Canvas',\n },\n },\n nodes: {\n fill: '#F5F5F5',\n [HighContrastSelector]: {\n fill: 'Canvas',\n },\n },\n toolTip: getTooltipStyle() as GriffelStyle,\n nodeTextContainer: {\n '& text': {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n\n marginTop: '4px',\n marginLeft: '8px',\n marginBottom: '4px',\n marginRight: '8px',\n },\n chartWrapper: {\n overflow: 'auto',\n },\n chart: {\n display: 'block',\n },\n chartTitle: getChartTitleStyles() as GriffelStyle,\n svgTooltip: {\n fill: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n fill: 'Canvas',\n },\n },\n});\n\nexport const useSankeyChartStyles = (props: SankeyChartProps): SankeyChartStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(sankeyChartClassNames.root, baseStyles.root, props.styles?.root),\n nodes: mergeClasses(sankeyChartClassNames.nodes, baseStyles.nodes /*, props.styles?.nodes*/),\n links: mergeClasses(sankeyChartClassNames.links, baseStyles.links /*, props.styles?.links*/),\n nodeTextContainer: mergeClasses(\n sankeyChartClassNames.nodeTextContainer,\n baseStyles.nodeTextContainer /*, props.styles?.nodeTextContainer*/,\n ),\n toolTip: mergeClasses(sankeyChartClassNames.toolTip, baseStyles.toolTip /*, props.styles?.toolTip*/),\n chartWrapper: mergeClasses(\n sankeyChartClassNames.chartWrapper,\n props.reflowProps?.mode === 'min-width' ? baseStyles.chartWrapper : '',\n props.styles?.chartWrapper,\n ),\n chart: mergeClasses(sankeyChartClassNames.chart, baseStyles.chart, props.styles?.chart),\n chartTitle: mergeClasses(sankeyChartClassNames.chartTitle, baseStyles.chartTitle, props.styles?.chartTitle),\n svgTooltip: mergeClasses(sankeyChartClassNames.svgTooltip, baseStyles.svgTooltip, props.styles?.svgTooltip),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","HighContrastSelector","getTooltipStyle","getChartTitleStyles","sankeyChartClassNames","root","nodes","links","nodeTextContainer","toolTip","chartWrapper","chart","chartTitle","svgTooltip","useStyles","body1","display","width","height","flexDirection","overflow","textAlign","fill","colorNeutralBackground1","strokeWidth","marginTop","marginLeft","marginBottom","marginRight","useSankeyChartStyles","props","baseStyles","styles","reflowProps","mode"],"mappings":"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"}
|
|
@@ -16,6 +16,7 @@ const _useVerticalStackedBarChartStylesstyles = require("./useVerticalStackedBar
|
|
|
16
16
|
const _d3scale = require("d3-scale");
|
|
17
17
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
18
18
|
const _reacttheme = require("@fluentui/react-theme");
|
|
19
|
+
const _reacttabster = require("@fluentui/react-tabster");
|
|
19
20
|
const _index = require("../../index");
|
|
20
21
|
const _index1 = require("../../utilities/index");
|
|
21
22
|
const _chartutilities = require("@fluentui/chart-utilities");
|
|
@@ -34,6 +35,10 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
|
|
|
34
35
|
const _isRtl = (0, _index1.useRtl)();
|
|
35
36
|
const _createLegendsForLine = (data)=>_getLineLegends(data);
|
|
36
37
|
const _emptyChartId = (0, _reactutilities.useId)('_VSBC_empty');
|
|
38
|
+
const _arrowNavigationAttributes = (0, _reacttabster.useArrowNavigationGroup)({
|
|
39
|
+
axis: 'vertical',
|
|
40
|
+
circular: true
|
|
41
|
+
});
|
|
37
42
|
let _points = [];
|
|
38
43
|
let _dataset;
|
|
39
44
|
let _xAxisLabels = [];
|
|
@@ -163,17 +168,14 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
|
|
|
163
168
|
clientX = boundingRect.left + boundingRect.width / 2;
|
|
164
169
|
clientY = boundingRect.top + boundingRect.height / 2;
|
|
165
170
|
}
|
|
166
|
-
if (
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
} else {
|
|
176
|
-
_onStackHoverFocus(lineData.xItem, event);
|
|
171
|
+
if (_noLegendHighlighted() || _isLegendHighlighted(lineData.legend)) {
|
|
172
|
+
_updatePosition(clientX, clientY);
|
|
173
|
+
setPopoverOpen(true);
|
|
174
|
+
setXCalloutValue(`${lineData.xItem.xAxisPoint}`);
|
|
175
|
+
setYCalloutValue(`${lineData.yAxisCalloutData || lineData.data || lineData.y}`);
|
|
176
|
+
setCalloutLegend(lineData.legend);
|
|
177
|
+
setActiveXAxisDataPoint(lineData.xItem.xAxisPoint);
|
|
178
|
+
setColor(lineData.color);
|
|
177
179
|
}
|
|
178
180
|
}
|
|
179
181
|
function _onStackHoverFocus(stack, event) {
|
|
@@ -337,19 +339,9 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
|
|
|
337
339
|
const _isHavingLines = props.data.some((item)=>item.lineData && item.lineData.length > 0);
|
|
338
340
|
return props.onRenderCalloutPerStack ? props.onRenderCalloutPerStack(stackCalloutProps) : props.onRenderCalloutPerDataPoint && !_isHavingLines ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout) : null;
|
|
339
341
|
}
|
|
340
|
-
function _toFocusWholeStack(
|
|
342
|
+
function _toFocusWholeStack() {
|
|
341
343
|
const { isCalloutForStack = false } = props;
|
|
342
|
-
|
|
343
|
-
if (_isHavingLines) {
|
|
344
|
-
if (_getHighlightedLegend().length === 1) {
|
|
345
|
-
shouldFocusStackOnly = false;
|
|
346
|
-
} else {
|
|
347
|
-
shouldFocusStackOnly = true;
|
|
348
|
-
}
|
|
349
|
-
} else {
|
|
350
|
-
shouldFocusStackOnly = isCalloutForStack;
|
|
351
|
-
}
|
|
352
|
-
return shouldFocusStackOnly;
|
|
344
|
+
return isCalloutForStack;
|
|
353
345
|
}
|
|
354
346
|
function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues) {
|
|
355
347
|
let domainNRangeValue;
|
|
@@ -455,8 +447,8 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
|
|
|
455
447
|
const circleRef = {
|
|
456
448
|
refElement: null
|
|
457
449
|
};
|
|
458
|
-
const noBarsAndLinesActive = circlePoint.xItem.chartData.filter((dataPoint)=>_noLegendHighlighted() || _isLegendHighlighted(dataPoint.legend)).length === 0;
|
|
459
450
|
const yScaleBandwidthTranslate = !circlePoint.useSecondaryYScale && _yAxisType === _index1.YAxisType.StringAxis ? yScalePrimary.bandwidth() / 2 : 0;
|
|
451
|
+
const shouldHighlight = _isLegendHighlighted(circlePoint.legend) || _noLegendHighlighted() ? true : false;
|
|
460
452
|
dots.push(/*#__PURE__*/ _react.createElement("circle", {
|
|
461
453
|
key: `${index}-${subIndex}-dot`,
|
|
462
454
|
cx: xScale(circlePoint.xItem.xAxisPoint),
|
|
@@ -474,13 +466,11 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
|
|
|
474
466
|
ref: (e)=>{
|
|
475
467
|
circleRef.refElement = e;
|
|
476
468
|
},
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
'aria-label': _getAriaLabel(circlePoint.xItem, circlePoint)
|
|
483
|
-
} : {}
|
|
469
|
+
tabIndex: !props.hideTooltip && shouldHighlight ? 0 : undefined,
|
|
470
|
+
onFocus: (event)=>_lineFocus(event, circlePoint, circleRef),
|
|
471
|
+
onBlur: _handleMouseOut,
|
|
472
|
+
role: "img",
|
|
473
|
+
"aria-label": _getAriaLabel(circlePoint.xItem, circlePoint, true)
|
|
484
474
|
}));
|
|
485
475
|
});
|
|
486
476
|
});
|
|
@@ -747,8 +737,7 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
|
|
|
747
737
|
const classes = (0, _useVerticalStackedBarChartStylesstyles.useVerticalStackedBarChartStyles)(props);
|
|
748
738
|
function _createBar(xBarScale, yBarScale, containerHeight, xElement) {
|
|
749
739
|
const { barCornerRadius = 0, barMinimumHeight = 0 } = props;
|
|
750
|
-
const
|
|
751
|
-
const shouldFocusWholeStack = _toFocusWholeStack(_isHavingLines);
|
|
740
|
+
const shouldFocusWholeStack = _toFocusWholeStack();
|
|
752
741
|
if (_xAxisType === _index1.XAxisTypes.StringAxis) {
|
|
753
742
|
_barWidth = (0, _index1.getBarWidth)(props.barWidth, props.maxBarWidth, xBarScale.bandwidth());
|
|
754
743
|
}
|
|
@@ -1021,7 +1010,7 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
|
|
|
1021
1010
|
if (!_isChartEmpty()) {
|
|
1022
1011
|
_adjustProps();
|
|
1023
1012
|
const _isHavingLines = props.data.some((item)=>item.lineData && item.lineData.length > 0);
|
|
1024
|
-
const shouldFocusWholeStack = _toFocusWholeStack(
|
|
1013
|
+
const shouldFocusWholeStack = _toFocusWholeStack();
|
|
1025
1014
|
_dataset = _createDataSetLayer();
|
|
1026
1015
|
const legendBars = _getLegendData(_points, _createLegendsForLine(props.data));
|
|
1027
1016
|
const calloutProps = {
|
|
@@ -1035,7 +1024,7 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
|
|
|
1035
1024
|
...(0, _index1.getAccessibleDataObject)(callOutAccessibilityData),
|
|
1036
1025
|
clickPosition: clickPosition,
|
|
1037
1026
|
isPopoverOpen: isPopoverOpen,
|
|
1038
|
-
isCalloutForStack:
|
|
1027
|
+
isCalloutForStack: shouldFocusWholeStack,
|
|
1039
1028
|
isCartesian: true,
|
|
1040
1029
|
customCallout: {
|
|
1041
1030
|
customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout() : undefined,
|
|
@@ -1080,7 +1069,7 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
|
|
|
1080
1069
|
],
|
|
1081
1070
|
getYDomainMargins: _getYDomainMargins,
|
|
1082
1071
|
/* eslint-disable react/jsx-no-bind */ children: (props)=>{
|
|
1083
|
-
return /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("g",
|
|
1072
|
+
return /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("g", _arrowNavigationAttributes, _bars), /*#__PURE__*/ _react.createElement("g", null, _isHavingLines && _createLines(props.xScale, props.yScalePrimary, props.containerHeight, props.containerWidth, props.yScaleSecondary)));
|
|
1084
1073
|
}
|
|
1085
1074
|
});
|
|
1086
1075
|
}
|