@fluentui/react-charts 0.0.0-nightly-20260112-0407.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 +356 -0
- package/lib/PolarChart.js +1 -0
- package/lib/PolarChart.js.map +1 -0
- 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/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 +13 -4
- 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/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/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/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/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 +12 -3
- 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/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/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
package/CHANGELOG.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-charts
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 13 Jan 2026 04:21:22 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20260113-0406.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v0.0.0-nightly-20260113-0406.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.8..@fluentui/react-charts_v0.0.0-nightly-
|
|
9
|
+
Tue, 13 Jan 2026 04:21:22 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.8..@fluentui/react-charts_v0.0.0-nightly-20260113-0406.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui/react-button to v0.0.0-nightly-
|
|
16
|
-
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
|
17
|
-
- Bump @fluentui/react-overflow to v0.0.0-nightly-
|
|
18
|
-
- Bump @fluentui/react-popover to v0.0.0-nightly-
|
|
19
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
|
20
|
-
- Bump @fluentui/react-tabster to v0.0.0-nightly-
|
|
21
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
22
|
-
- Bump @fluentui/react-tooltip to v0.0.0-nightly-
|
|
23
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui/react-button to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
|
|
17
|
+
- Bump @fluentui/react-overflow to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
|
|
18
|
+
- Bump @fluentui/react-popover to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
|
|
19
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
|
|
20
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
|
|
21
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
|
|
22
|
+
- Bump @fluentui/react-tooltip to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
|
|
23
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
|
|
24
24
|
|
|
25
25
|
## [9.3.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v9.3.8)
|
|
26
26
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CurveFactory } from 'd3-shape';
|
|
2
|
+
import type { Font } from '@fluentui/chart-utilities';
|
|
2
3
|
import type { JSXElement } from '@fluentui/react-utilities';
|
|
3
4
|
import type { Margin } from '@fluentui/chart-utilities';
|
|
4
5
|
import { PositioningShorthand } from '@fluentui/react-positioning';
|
|
@@ -152,6 +153,24 @@ export declare interface AreaChartStyleProps extends CartesianChartStyleProps {
|
|
|
152
153
|
export declare interface AreaChartStyles extends CartesianChartStyles {
|
|
153
154
|
}
|
|
154
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Represents a areapolar series.
|
|
158
|
+
*/
|
|
159
|
+
export declare interface AreaPolarSeries extends DataSeries {
|
|
160
|
+
/**
|
|
161
|
+
* Type discriminator: always 'areapolar' for this series.
|
|
162
|
+
*/
|
|
163
|
+
type: 'areapolar';
|
|
164
|
+
/**
|
|
165
|
+
* Array of data points for the series.
|
|
166
|
+
*/
|
|
167
|
+
data: PolarDataPoint[];
|
|
168
|
+
/**
|
|
169
|
+
* Additional line rendering options (e.g., stroke width, curve type).
|
|
170
|
+
*/
|
|
171
|
+
lineOptions?: LineChartLineOptions;
|
|
172
|
+
}
|
|
173
|
+
|
|
155
174
|
/**
|
|
156
175
|
* Specifies the ordering options for axis categories in Cartesian charts.
|
|
157
176
|
*
|
|
@@ -322,6 +341,10 @@ export declare const CartesianChart: React_2.FunctionComponent<ModifiedCartesian
|
|
|
322
341
|
* {@docCategory CartesianChart}
|
|
323
342
|
*/
|
|
324
343
|
export declare interface CartesianChartProps {
|
|
344
|
+
/**
|
|
345
|
+
* Title styles configuration for the chart title
|
|
346
|
+
*/
|
|
347
|
+
titleStyles?: TitleStyles;
|
|
325
348
|
/**
|
|
326
349
|
* Below height used for resizing of the chart
|
|
327
350
|
* Wrap chart in your container and send the updated height and width to these props.
|
|
@@ -1051,6 +1074,10 @@ export declare const ChartTable: React_2.FunctionComponent<ChartTableProps>;
|
|
|
1051
1074
|
* {@docCategory ChartTable}
|
|
1052
1075
|
*/
|
|
1053
1076
|
export declare interface ChartTableProps {
|
|
1077
|
+
/**
|
|
1078
|
+
* Title styles configuration for the chart title
|
|
1079
|
+
*/
|
|
1080
|
+
titleStyles?: TitleStyles;
|
|
1054
1081
|
/**
|
|
1055
1082
|
* 1d or 2d Array of header values.
|
|
1056
1083
|
*/
|
|
@@ -1075,6 +1102,10 @@ export declare interface ChartTableProps {
|
|
|
1075
1102
|
* @default '650px'
|
|
1076
1103
|
*/
|
|
1077
1104
|
height?: string | number;
|
|
1105
|
+
/**
|
|
1106
|
+
* Chart title to display above the table
|
|
1107
|
+
*/
|
|
1108
|
+
chartTitle?: string;
|
|
1078
1109
|
/**
|
|
1079
1110
|
* Additional class name(s) to apply to the table chart
|
|
1080
1111
|
*/
|
|
@@ -1100,6 +1131,8 @@ export declare interface ChartTableStyles {
|
|
|
1100
1131
|
headerCell?: string;
|
|
1101
1132
|
bodyCell?: string;
|
|
1102
1133
|
chart?: string;
|
|
1134
|
+
chartTitle?: string;
|
|
1135
|
+
svgTooltip?: string;
|
|
1103
1136
|
}
|
|
1104
1137
|
|
|
1105
1138
|
declare enum ChartTypes {
|
|
@@ -1374,6 +1407,10 @@ export declare const DonutChart: React_2.FunctionComponent<DonutChartProps>;
|
|
|
1374
1407
|
* {@docCategory DonutChart}
|
|
1375
1408
|
*/
|
|
1376
1409
|
export declare interface DonutChartProps extends CartesianChartProps {
|
|
1410
|
+
/**
|
|
1411
|
+
* Title styles configuration for the chart title
|
|
1412
|
+
*/
|
|
1413
|
+
titleStyles?: TitleStyles;
|
|
1377
1414
|
/**
|
|
1378
1415
|
* Data to render in the chart.
|
|
1379
1416
|
*/
|
|
@@ -1494,6 +1531,10 @@ export declare interface DonutChartStyles {
|
|
|
1494
1531
|
* Style for the legend container.
|
|
1495
1532
|
*/
|
|
1496
1533
|
legendContainer: string;
|
|
1534
|
+
/**
|
|
1535
|
+
* Style for the chart title.
|
|
1536
|
+
*/
|
|
1537
|
+
chartTitle?: string;
|
|
1497
1538
|
/**
|
|
1498
1539
|
* styles for axis annotation
|
|
1499
1540
|
*/
|
|
@@ -1502,6 +1543,10 @@ export declare interface DonutChartStyles {
|
|
|
1502
1543
|
* Styles for the chart wrapper div
|
|
1503
1544
|
*/
|
|
1504
1545
|
chartWrapper?: string;
|
|
1546
|
+
/**
|
|
1547
|
+
* Style for SVG tooltip text
|
|
1548
|
+
*/
|
|
1549
|
+
svgTooltip?: string;
|
|
1505
1550
|
}
|
|
1506
1551
|
|
|
1507
1552
|
export declare interface DPointType {
|
|
@@ -1571,6 +1616,10 @@ export declare interface FunnelChartDataPoint {
|
|
|
1571
1616
|
* {@docCategory FunnelChart}
|
|
1572
1617
|
*/
|
|
1573
1618
|
export declare interface FunnelChartProps {
|
|
1619
|
+
/**
|
|
1620
|
+
* Title styles configuration for the chart title
|
|
1621
|
+
*/
|
|
1622
|
+
titleStyles?: TitleStyles;
|
|
1574
1623
|
/**
|
|
1575
1624
|
* Data points for the funnel chart
|
|
1576
1625
|
*/
|
|
@@ -1655,10 +1704,18 @@ export declare interface FunnelChartStyles {
|
|
|
1655
1704
|
* Styles for the chart
|
|
1656
1705
|
*/
|
|
1657
1706
|
chart?: string;
|
|
1707
|
+
/**
|
|
1708
|
+
* Style for the chart title.
|
|
1709
|
+
*/
|
|
1710
|
+
chartTitle?: string;
|
|
1658
1711
|
/**
|
|
1659
1712
|
* Styles for text elements
|
|
1660
1713
|
*/
|
|
1661
1714
|
text?: string;
|
|
1715
|
+
/**
|
|
1716
|
+
* Style for SVG tooltip text
|
|
1717
|
+
*/
|
|
1718
|
+
svgTooltip?: string;
|
|
1662
1719
|
/**
|
|
1663
1720
|
* Styles for the callout root element
|
|
1664
1721
|
*/
|
|
@@ -1787,6 +1844,10 @@ export declare const GaugeChart: React_2.FunctionComponent<GaugeChartProps>;
|
|
|
1787
1844
|
* {@docCategory GaugeChart}
|
|
1788
1845
|
*/
|
|
1789
1846
|
export declare interface GaugeChartProps {
|
|
1847
|
+
/**
|
|
1848
|
+
* Title styles configuration for the chart title
|
|
1849
|
+
*/
|
|
1850
|
+
titleStyles?: TitleStyles;
|
|
1790
1851
|
/**
|
|
1791
1852
|
* Width of the chart
|
|
1792
1853
|
*/
|
|
@@ -3313,6 +3374,24 @@ export declare interface LineDataInVerticalStackedBarChart {
|
|
|
3313
3374
|
lineOptions?: LineChartLineOptions;
|
|
3314
3375
|
}
|
|
3315
3376
|
|
|
3377
|
+
/**
|
|
3378
|
+
* Represents a linepolar series.
|
|
3379
|
+
*/
|
|
3380
|
+
export declare interface LinePolarSeries extends DataSeries {
|
|
3381
|
+
/**
|
|
3382
|
+
* Type discriminator: always 'linepolar' for this series.
|
|
3383
|
+
*/
|
|
3384
|
+
type: 'linepolar';
|
|
3385
|
+
/**
|
|
3386
|
+
* Array of data points for the series.
|
|
3387
|
+
*/
|
|
3388
|
+
data: PolarDataPoint[];
|
|
3389
|
+
/**
|
|
3390
|
+
* Additional line rendering options (e.g., stroke width, curve type).
|
|
3391
|
+
*/
|
|
3392
|
+
lineOptions?: LineChartLineOptions;
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3316
3395
|
/**
|
|
3317
3396
|
* Represents a line series.
|
|
3318
3397
|
*/
|
|
@@ -3529,6 +3608,223 @@ declare enum Points {
|
|
|
3529
3608
|
octagon = 7
|
|
3530
3609
|
}
|
|
3531
3610
|
|
|
3611
|
+
/**
|
|
3612
|
+
* Configuration options for a polar axis.
|
|
3613
|
+
* {@docCategory PolarChart}
|
|
3614
|
+
*/
|
|
3615
|
+
export declare type PolarAxisProps = AxisProps & {
|
|
3616
|
+
/**
|
|
3617
|
+
* Values at which ticks should be placed on the axis.
|
|
3618
|
+
*/
|
|
3619
|
+
tickValues?: number[] | Date[] | string[];
|
|
3620
|
+
/**
|
|
3621
|
+
* Format string for the axis ticks.
|
|
3622
|
+
* For numbers, see: https://d3js.org/d3-format.
|
|
3623
|
+
* And for dates see: https://d3js.org/d3-time-format.
|
|
3624
|
+
*/
|
|
3625
|
+
tickFormat?: string;
|
|
3626
|
+
/**
|
|
3627
|
+
* Number of ticks to display on the axis.
|
|
3628
|
+
*/
|
|
3629
|
+
tickCount?: number;
|
|
3630
|
+
/**
|
|
3631
|
+
* Defines the order of categories on the axis.
|
|
3632
|
+
* @default 'default'
|
|
3633
|
+
*/
|
|
3634
|
+
categoryOrder?: AxisCategoryOrder;
|
|
3635
|
+
/**
|
|
3636
|
+
* Scale type for the axis.
|
|
3637
|
+
* @default 'default'
|
|
3638
|
+
*/
|
|
3639
|
+
scaleType?: AxisScaleType;
|
|
3640
|
+
/**
|
|
3641
|
+
* Start value of the axis range.
|
|
3642
|
+
*/
|
|
3643
|
+
rangeStart?: number | Date;
|
|
3644
|
+
/**
|
|
3645
|
+
* End value of the axis range.
|
|
3646
|
+
*/
|
|
3647
|
+
rangeEnd?: number | Date;
|
|
3648
|
+
};
|
|
3649
|
+
|
|
3650
|
+
export declare const PolarChart: React_2.FunctionComponent<PolarChartProps>;
|
|
3651
|
+
|
|
3652
|
+
/**
|
|
3653
|
+
* Polar Chart properties
|
|
3654
|
+
* {@docCategory PolarChart}
|
|
3655
|
+
*/
|
|
3656
|
+
export declare interface PolarChartProps {
|
|
3657
|
+
/**
|
|
3658
|
+
* Data series to be rendered in the polar chart.
|
|
3659
|
+
*/
|
|
3660
|
+
data: (AreaPolarSeries | LinePolarSeries | ScatterPolarSeries)[];
|
|
3661
|
+
/**
|
|
3662
|
+
* Width of the polar chart.
|
|
3663
|
+
* @default 200
|
|
3664
|
+
*/
|
|
3665
|
+
width?: number;
|
|
3666
|
+
/**
|
|
3667
|
+
* Height of the polar chart.
|
|
3668
|
+
* @default 200
|
|
3669
|
+
*/
|
|
3670
|
+
height?: number;
|
|
3671
|
+
/**
|
|
3672
|
+
* Margins around the chart area.
|
|
3673
|
+
*/
|
|
3674
|
+
margins?: Margins;
|
|
3675
|
+
/**
|
|
3676
|
+
* If true, hides the legend.
|
|
3677
|
+
* @default false
|
|
3678
|
+
*/
|
|
3679
|
+
hideLegend?: boolean;
|
|
3680
|
+
/**
|
|
3681
|
+
* If true, hides the tooltip.
|
|
3682
|
+
* @default false
|
|
3683
|
+
*/
|
|
3684
|
+
hideTooltip?: boolean;
|
|
3685
|
+
legendProps?: Partial<LegendsProps>;
|
|
3686
|
+
/**
|
|
3687
|
+
* Style properties for the polar chart.
|
|
3688
|
+
*/
|
|
3689
|
+
styles?: PolarChartStyles;
|
|
3690
|
+
/**
|
|
3691
|
+
* Title of the chart.
|
|
3692
|
+
*/
|
|
3693
|
+
chartTitle?: string;
|
|
3694
|
+
/**
|
|
3695
|
+
* Fraction of the radius to cut out from the center of the chart.
|
|
3696
|
+
* Accepts values in the range [0, 1].
|
|
3697
|
+
*/
|
|
3698
|
+
hole?: number;
|
|
3699
|
+
/**
|
|
3700
|
+
* Shape of the polar chart.
|
|
3701
|
+
* @default 'circle'
|
|
3702
|
+
*/
|
|
3703
|
+
shape?: 'circle' | 'polygon';
|
|
3704
|
+
/**
|
|
3705
|
+
* Direction in which the chart is drawn.
|
|
3706
|
+
* @default 'counterclockwise'
|
|
3707
|
+
*/
|
|
3708
|
+
direction?: 'clockwise' | 'counterclockwise';
|
|
3709
|
+
/**
|
|
3710
|
+
* Configuration options for the radial axis.
|
|
3711
|
+
*/
|
|
3712
|
+
radialAxis?: PolarAxisProps;
|
|
3713
|
+
/**
|
|
3714
|
+
* Configuration options for the angular axis.
|
|
3715
|
+
*/
|
|
3716
|
+
angularAxis?: PolarAxisProps & {
|
|
3717
|
+
/**
|
|
3718
|
+
* Format unit for angular values.
|
|
3719
|
+
* @default 'degrees'
|
|
3720
|
+
*/
|
|
3721
|
+
unit?: 'radians' | 'degrees';
|
|
3722
|
+
};
|
|
3723
|
+
/**
|
|
3724
|
+
* Optional callback to access the Chart interface. Use this instead of ref for accessing
|
|
3725
|
+
* the public methods and properties of the component.
|
|
3726
|
+
*/
|
|
3727
|
+
componentRef?: React_2.Ref<Chart>;
|
|
3728
|
+
/**
|
|
3729
|
+
* Locale identifier string used to format numbers and dates according to the specified culture.
|
|
3730
|
+
* Example: 'en-US', 'fr-FR'.
|
|
3731
|
+
*/
|
|
3732
|
+
culture?: string;
|
|
3733
|
+
/**
|
|
3734
|
+
* Options for localizing date values.
|
|
3735
|
+
*/
|
|
3736
|
+
dateLocalizeOptions?: Intl.DateTimeFormatOptions;
|
|
3737
|
+
/**
|
|
3738
|
+
* If true, date values are treated as UTC dates.
|
|
3739
|
+
* @default false
|
|
3740
|
+
*/
|
|
3741
|
+
useUTC?: boolean;
|
|
3742
|
+
}
|
|
3743
|
+
|
|
3744
|
+
/**
|
|
3745
|
+
* Polar Chart style properties
|
|
3746
|
+
* {@docCategory PolarChart}
|
|
3747
|
+
*/
|
|
3748
|
+
export declare interface PolarChartStyleProps {
|
|
3749
|
+
}
|
|
3750
|
+
|
|
3751
|
+
/**
|
|
3752
|
+
* Polar Chart styles
|
|
3753
|
+
* {@docCategory PolarChart}
|
|
3754
|
+
*/
|
|
3755
|
+
export declare interface PolarChartStyles {
|
|
3756
|
+
/**
|
|
3757
|
+
* Style for the root element.
|
|
3758
|
+
*/
|
|
3759
|
+
root?: string;
|
|
3760
|
+
/**
|
|
3761
|
+
* Style for the chart wrapper element.
|
|
3762
|
+
*/
|
|
3763
|
+
chartWrapper?: string;
|
|
3764
|
+
/**
|
|
3765
|
+
* Style for the chart element.
|
|
3766
|
+
*/
|
|
3767
|
+
chart?: string;
|
|
3768
|
+
/**
|
|
3769
|
+
* Style for the inner grid lines.
|
|
3770
|
+
*/
|
|
3771
|
+
gridLineInner?: string;
|
|
3772
|
+
/**
|
|
3773
|
+
* Style for the outer grid lines.
|
|
3774
|
+
*/
|
|
3775
|
+
gridLineOuter?: string;
|
|
3776
|
+
/**
|
|
3777
|
+
* Style for the tick labels.
|
|
3778
|
+
*/
|
|
3779
|
+
tickLabel?: string;
|
|
3780
|
+
/**
|
|
3781
|
+
* Style for the legend container.
|
|
3782
|
+
*/
|
|
3783
|
+
legendContainer?: string;
|
|
3784
|
+
}
|
|
3785
|
+
|
|
3786
|
+
/**
|
|
3787
|
+
* Represents a single data point in a polar series.
|
|
3788
|
+
*/
|
|
3789
|
+
export declare interface PolarDataPoint {
|
|
3790
|
+
/**
|
|
3791
|
+
* Radial value of the data point.
|
|
3792
|
+
*/
|
|
3793
|
+
r: string | number | Date;
|
|
3794
|
+
/**
|
|
3795
|
+
* Angular value of the data point, specified as a category or in degrees.
|
|
3796
|
+
*/
|
|
3797
|
+
theta: string | number;
|
|
3798
|
+
/**
|
|
3799
|
+
* Optional click handler for the data point.
|
|
3800
|
+
*/
|
|
3801
|
+
onClick?: () => void;
|
|
3802
|
+
/**
|
|
3803
|
+
* Custom text to show in the callout in place of the radial axis value.
|
|
3804
|
+
*/
|
|
3805
|
+
radialAxisCalloutData?: string;
|
|
3806
|
+
/**
|
|
3807
|
+
* Custom text to show in the callout in place of the angular axis value.
|
|
3808
|
+
*/
|
|
3809
|
+
angularAxisCalloutData?: string;
|
|
3810
|
+
/**
|
|
3811
|
+
* Accessibility properties for the data point.
|
|
3812
|
+
*/
|
|
3813
|
+
callOutAccessibilityData?: AccessibilityProps;
|
|
3814
|
+
/**
|
|
3815
|
+
* Custom marker size for the data point.
|
|
3816
|
+
*/
|
|
3817
|
+
markerSize?: number;
|
|
3818
|
+
/**
|
|
3819
|
+
* Optional text to annotate or label the data point.
|
|
3820
|
+
*/
|
|
3821
|
+
text?: string;
|
|
3822
|
+
/**
|
|
3823
|
+
* Color of the data point. If not provided, it will inherit the series color.
|
|
3824
|
+
*/
|
|
3825
|
+
color?: string;
|
|
3826
|
+
}
|
|
3827
|
+
|
|
3532
3828
|
export declare interface PopoverComponentStyles {
|
|
3533
3829
|
calloutContentRoot: string;
|
|
3534
3830
|
calloutDateTimeContainer: string;
|
|
@@ -3676,6 +3972,10 @@ export declare interface SankeyChartData {
|
|
|
3676
3972
|
* {@docCategory SankeyChart}
|
|
3677
3973
|
*/
|
|
3678
3974
|
export declare interface SankeyChartProps {
|
|
3975
|
+
/**
|
|
3976
|
+
* Title styles configuration for the chart title
|
|
3977
|
+
*/
|
|
3978
|
+
titleStyles?: TitleStyles;
|
|
3679
3979
|
/**
|
|
3680
3980
|
* Data to render in the chart.
|
|
3681
3981
|
*/
|
|
@@ -3746,6 +4046,11 @@ export declare interface SankeyChartProps {
|
|
|
3746
4046
|
* The prop used to define the culture to localize the numbers and date
|
|
3747
4047
|
*/
|
|
3748
4048
|
culture?: string;
|
|
4049
|
+
/**
|
|
4050
|
+
* Whether to hide the legend
|
|
4051
|
+
* @default false
|
|
4052
|
+
*/
|
|
4053
|
+
hideLegend?: boolean;
|
|
3749
4054
|
/**
|
|
3750
4055
|
* Props related to reflow behavior of the chart
|
|
3751
4056
|
*/
|
|
@@ -3803,6 +4108,14 @@ export declare interface SankeyChartStyles {
|
|
|
3803
4108
|
* Styles for the chart svg element
|
|
3804
4109
|
*/
|
|
3805
4110
|
chart?: string;
|
|
4111
|
+
/**
|
|
4112
|
+
* Style for SVG tooltip text
|
|
4113
|
+
*/
|
|
4114
|
+
svgTooltip?: string;
|
|
4115
|
+
/**
|
|
4116
|
+
* Style for the chart title.
|
|
4117
|
+
*/
|
|
4118
|
+
chartTitle?: string;
|
|
3806
4119
|
}
|
|
3807
4120
|
|
|
3808
4121
|
declare type SankeyLayoutGenerator = SankeyLayout<SankeyGraph<{}, {}>, {}, {}>;
|
|
@@ -3929,6 +4242,20 @@ export declare interface ScatterChartStyles extends CartesianChartStyles {
|
|
|
3929
4242
|
markerLabel?: string;
|
|
3930
4243
|
}
|
|
3931
4244
|
|
|
4245
|
+
/**
|
|
4246
|
+
* Represents a scatterpolar series.
|
|
4247
|
+
*/
|
|
4248
|
+
export declare interface ScatterPolarSeries extends DataSeries {
|
|
4249
|
+
/**
|
|
4250
|
+
* Type discriminator: always 'scatterpolar' for this series.
|
|
4251
|
+
*/
|
|
4252
|
+
type: 'scatterpolar';
|
|
4253
|
+
/**
|
|
4254
|
+
* Array of data points for the series.
|
|
4255
|
+
*/
|
|
4256
|
+
data: PolarDataPoint[];
|
|
4257
|
+
}
|
|
4258
|
+
|
|
3932
4259
|
/**
|
|
3933
4260
|
* DeclarativeChart schema.
|
|
3934
4261
|
* {@docCategory DeclarativeChart}
|
|
@@ -4061,6 +4388,35 @@ declare interface TextboxProps {
|
|
|
4061
4388
|
fill?: string;
|
|
4062
4389
|
}
|
|
4063
4390
|
|
|
4391
|
+
/**
|
|
4392
|
+
* Shared interface for chart title styling properties.
|
|
4393
|
+
* Used by components that display a chart title with customizable font, alignment, and padding.
|
|
4394
|
+
* {@docCategory TitleStyles}
|
|
4395
|
+
*/
|
|
4396
|
+
declare interface TitleStyles {
|
|
4397
|
+
/**
|
|
4398
|
+
* Font configuration for the title
|
|
4399
|
+
*/
|
|
4400
|
+
titleFont?: Partial<Font>;
|
|
4401
|
+
/**
|
|
4402
|
+
* Horizontal anchor/alignment for the chart title
|
|
4403
|
+
*/
|
|
4404
|
+
titleXAnchor?: 'auto' | 'left' | 'center' | 'right';
|
|
4405
|
+
/**
|
|
4406
|
+
* Vertical anchor/alignment for the chart title
|
|
4407
|
+
*/
|
|
4408
|
+
titleYAnchor?: 'auto' | 'top' | 'middle' | 'bottom';
|
|
4409
|
+
/**
|
|
4410
|
+
* Padding for the chart title
|
|
4411
|
+
*/
|
|
4412
|
+
titlePad?: {
|
|
4413
|
+
t?: number;
|
|
4414
|
+
r?: number;
|
|
4415
|
+
b?: number;
|
|
4416
|
+
l?: number;
|
|
4417
|
+
};
|
|
4418
|
+
}
|
|
4419
|
+
|
|
4064
4420
|
/**
|
|
4065
4421
|
* VerticalBarchart component
|
|
4066
4422
|
* {@docCategory VerticalBarChart}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/PolarChart/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/PolarChart.ts"],"sourcesContent":["export * from './components/PolarChart/index';\n"],"names":[],"mappings":"AAAA,cAAc,gCAAgC"}
|
|
@@ -5,6 +5,7 @@ import { tokens } from '@fluentui/react-theme';
|
|
|
5
5
|
import * as d3 from 'd3-color';
|
|
6
6
|
import { getColorContrast } from '../../utilities/colors';
|
|
7
7
|
import { resolveCSSVariables } from '../../utilities/utilities';
|
|
8
|
+
import { ChartTitle } from '../../utilities/index';
|
|
8
9
|
import { useImageExport } from '../../utilities/hooks';
|
|
9
10
|
import { useArrowNavigationGroup } from '@fluentui/react-tabster';
|
|
10
11
|
function invertHexColor(hex) {
|
|
@@ -37,7 +38,7 @@ function getSafeBackgroundColor(chartContainer, foreground, background) {
|
|
|
37
38
|
return invertedContrast >= 3 ? invertedBg : fallbackBg;
|
|
38
39
|
}
|
|
39
40
|
export const ChartTable = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
40
|
-
const { headers, rows, width, height } = props;
|
|
41
|
+
const { headers, rows, width, height, chartTitle } = props;
|
|
41
42
|
const { chartContainerRef: _rootElem } = useImageExport(props.componentRef, true, false);
|
|
42
43
|
const classes = useChartTableStyles(props);
|
|
43
44
|
const arrowAttributes = useArrowNavigationGroup({
|
|
@@ -78,23 +79,36 @@ export const ChartTable = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>
|
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
}
|
|
82
|
+
const titleHeight = chartTitle ? 30 : 0;
|
|
83
|
+
const totalHeight = typeof height === 'number' ? height : 650;
|
|
84
|
+
const tableHeight = `${totalHeight - titleHeight}px`;
|
|
85
|
+
const svgWidth = typeof width === 'number' ? width : '100%';
|
|
86
|
+
const titleMaxWidth = typeof width === 'number' ? width - 20 : undefined;
|
|
87
|
+
const titleX = typeof width === 'number' ? width / 2 : 0;
|
|
81
88
|
return /*#__PURE__*/ React.createElement("div", {
|
|
82
89
|
ref: (el)=>{
|
|
83
90
|
_rootElem.current = el;
|
|
84
91
|
},
|
|
85
92
|
className: classes.root,
|
|
86
93
|
style: {
|
|
87
|
-
height:
|
|
94
|
+
height: `${totalHeight}px`,
|
|
88
95
|
overflow: 'hidden'
|
|
89
96
|
}
|
|
90
97
|
}, /*#__PURE__*/ React.createElement("svg", {
|
|
91
|
-
width:
|
|
92
|
-
height:
|
|
93
|
-
}, /*#__PURE__*/ React.createElement(
|
|
98
|
+
width: svgWidth,
|
|
99
|
+
height: `${totalHeight}px`
|
|
100
|
+
}, chartTitle && /*#__PURE__*/ React.createElement(ChartTitle, {
|
|
101
|
+
title: chartTitle,
|
|
102
|
+
x: titleX,
|
|
103
|
+
maxWidth: titleMaxWidth,
|
|
104
|
+
className: classes.chartTitle,
|
|
105
|
+
titleStyles: props.titleStyles,
|
|
106
|
+
tooltipClassName: classes.svgTooltip
|
|
107
|
+
}), /*#__PURE__*/ React.createElement("foreignObject", {
|
|
94
108
|
x: "0",
|
|
95
|
-
y:
|
|
109
|
+
y: titleHeight,
|
|
96
110
|
width: "100%",
|
|
97
|
-
height:
|
|
111
|
+
height: tableHeight
|
|
98
112
|
}, /*#__PURE__*/ React.createElement("div", {
|
|
99
113
|
style: {
|
|
100
114
|
maxHeight: height ? `${height}px` : '650px',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ChartTable/ChartTable.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChartTableProps } from './ChartTable.types';\nimport { useChartTableStyles } from './useChartTableStyles.styles';\nimport { tokens } from '@fluentui/react-theme';\nimport * as d3 from 'd3-color';\nimport { getColorContrast } from '../../utilities/colors';\nimport { resolveCSSVariables } from '../../utilities/utilities';\nimport { useImageExport } from '../../utilities/hooks';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\n\nfunction invertHexColor(hex: string): string {\n const color = d3.color(hex);\n if (!color) {\n return tokens.colorNeutralForeground1!;\n }\n const rgb = color.rgb();\n return d3.rgb(255 - rgb.r, 255 - rgb.g, 255 - rgb.b).formatHex();\n}\n\nfunction getSafeBackgroundColor(chartContainer: HTMLElement, foreground?: string, background?: string): string {\n const fallbackFg = tokens.colorNeutralForeground1;\n const fallbackBg = tokens.colorNeutralBackground1;\n if (!chartContainer) {\n return fallbackBg;\n }\n\n const resolvedFg = resolveCSSVariables(chartContainer, foreground || fallbackFg);\n const resolvedBg = resolveCSSVariables(chartContainer, background || fallbackBg);\n\n const fg = d3.color(resolvedFg);\n const bg = d3.color(resolvedBg);\n\n if (!fg || !bg) {\n return resolvedBg;\n }\n const contrast = getColorContrast(fg.formatHex(), bg.formatHex());\n if (contrast >= 3) {\n return bg.formatHex();\n }\n\n const invertedBg = invertHexColor(bg.formatHex());\n const invertedContrast = getColorContrast(fg.formatHex(), invertedBg);\n return invertedContrast >= 3 ? invertedBg : fallbackBg;\n}\n\nexport const ChartTable: React.FunctionComponent<ChartTableProps> = React.forwardRef<HTMLDivElement, ChartTableProps>(\n (props, forwardedRef) => {\n const { headers, rows, width, height } = props;\n const { chartContainerRef: _rootElem } = useImageExport(props.componentRef, true, false);\n const classes = useChartTableStyles(props);\n const arrowAttributes = useArrowNavigationGroup({ axis: 'grid' });\n\n if (!headers || headers.length === 0) {\n return <div>No data available</div>;\n }\n\n const bgColorSet = new Set<string>();\n headers.forEach(header => {\n const bg = header?.style?.backgroundColor;\n const normalized = d3.color(bg || '')?.formatHex();\n if (normalized) {\n bgColorSet.add(normalized);\n }\n });\n let sharedBackgroundColor: string | undefined;\n let useSharedBackground = false;\n\n /*\n If we have only one or two unique background colors, we can consider using a shared background color\n for the table headers. This is to ensure better contrast with the foreground text.\n For size 1, we will consider that as default color if it satisfies the contrast ratio.\n There could also be a scenario where backgroundcolor array is of size 2, for eg: [\"dimsgray\", \"gray\"],\n which will assign 1st column header bg color to dimsgray and rest to gray. so our logic of shared background\n color won't run here. So will consider for size 2 as well.\n For size greater than this, we will consider that user wants different colors and will let color contrast fail\n if any.\n */\n if (bgColorSet.size === 1 || bgColorSet.size === 2) {\n const candidateBg = bgColorSet.size === 1 ? Array.from(bgColorSet)[0] : Array.from(bgColorSet)[1];\n for (const header of headers) {\n const fg = header?.style?.color;\n if (fg && getColorContrast(fg, candidateBg) >= 3) {\n sharedBackgroundColor = candidateBg;\n useSharedBackground = true;\n break;\n }\n }\n }\n\n return (\n <div\n ref={el => {\n _rootElem.current = el;\n }}\n className={classes.root as string}\n style={{ height: height ? `${height}px` : '650px', overflow: 'hidden' }}\n >\n <svg width={width ?? '100%'} height={height ?? '650px'}>\n <foreignObject x=\"0\" y=\"0\" width=\"100%\" height=\"100%\">\n <div\n style={{\n maxHeight: height ? `${height}px` : '650px',\n overflowY: 'auto',\n overflowX: 'auto',\n }}\n >\n <table\n className={classes.table}\n style={{\n width: width ? `${width}px` : '100%',\n }}\n {...arrowAttributes}\n >\n <thead>\n <tr>\n {headers.map((header, idx) => {\n const style = { ...header?.style };\n const fg = style.color;\n const bg = style.backgroundColor;\n\n if (useSharedBackground) {\n style.backgroundColor = sharedBackgroundColor;\n } else if (fg || bg) {\n style.backgroundColor = getSafeBackgroundColor(_rootElem.current!, fg, bg);\n }\n return (\n <th key={idx} className={classes.headerCell} style={style} tabIndex={0}>\n {header.value}\n </th>\n );\n })}\n </tr>\n </thead>\n {rows && rows.length > 0 && (\n <tbody>\n {rows.map((row, rowIdx) => (\n <tr key={rowIdx}>\n {row.map((cell, colIdx) => {\n const style = { ...cell?.style };\n const fg = style.color;\n const bg = style.backgroundColor;\n if (fg || bg) {\n style.backgroundColor = getSafeBackgroundColor(_rootElem.current!, fg, bg);\n }\n return (\n <td key={colIdx} className={classes.bodyCell} style={style} tabIndex={0}>\n {cell.value}\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n )}\n </table>\n </div>\n </foreignObject>\n </svg>\n </div>\n );\n },\n);\n\nChartTable.displayName = 'ChartTable';\n"],"names":["React","useChartTableStyles","tokens","d3","getColorContrast","resolveCSSVariables","useImageExport","useArrowNavigationGroup","invertHexColor","hex","color","colorNeutralForeground1","rgb","r","g","b","formatHex","getSafeBackgroundColor","chartContainer","foreground","background","fallbackFg","fallbackBg","colorNeutralBackground1","resolvedFg","resolvedBg","fg","bg","contrast","invertedBg","invertedContrast","ChartTable","forwardRef","props","forwardedRef","headers","rows","width","height","chartContainerRef","_rootElem","componentRef","classes","arrowAttributes","axis","length","div","bgColorSet","Set","forEach","header","style","backgroundColor","normalized","add","sharedBackgroundColor","useSharedBackground","size","candidateBg","Array","from","ref","el","current","className","root","overflow","svg","foreignObject","x","y","maxHeight","overflowY","overflowX","table","thead","tr","map","idx","th","key","headerCell","tabIndex","value","tbody","row","rowIdx","cell","colIdx","td","bodyCell","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,mBAAmB,QAAQ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e;YAC/B,MAAMzB,KAAKyB,MAAMzC,KAAK;YACtB,MAAMiB,KAAKwB,MAAMC,eAAe;YAChC,IAAI1B,MAAMC,IAAI;gBACZwB,MAAMC,eAAe,GAAGnC,uBAAuBuB,UAAUuB,OAAO,EAAGrC,IAAIC;YACzE;YACA,qBACE,oBAAC8D;gBAAGT,KAAKQ;gBAAQxB,WAAWtB,QAAQgD,QAAQ;gBAAEvC,OAAOA;gBAAO+B,UAAU;eACnEK,KAAKJ,KAAK;QAGjB;AAWtB,GACA;AAEFpD,WAAW4D,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/ChartTable/ChartTable.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChartTableProps } from './ChartTable.types';\nimport { useChartTableStyles } from './useChartTableStyles.styles';\nimport { tokens } from '@fluentui/react-theme';\nimport * as d3 from 'd3-color';\nimport { getColorContrast } from '../../utilities/colors';\nimport { resolveCSSVariables } from '../../utilities/utilities';\nimport { ChartTitle } from '../../utilities/index';\nimport { useImageExport } from '../../utilities/hooks';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\n\nfunction invertHexColor(hex: string): string {\n const color = d3.color(hex);\n if (!color) {\n return tokens.colorNeutralForeground1!;\n }\n const rgb = color.rgb();\n return d3.rgb(255 - rgb.r, 255 - rgb.g, 255 - rgb.b).formatHex();\n}\n\nfunction getSafeBackgroundColor(chartContainer: HTMLElement, foreground?: string, background?: string): string {\n const fallbackFg = tokens.colorNeutralForeground1;\n const fallbackBg = tokens.colorNeutralBackground1;\n if (!chartContainer) {\n return fallbackBg;\n }\n\n const resolvedFg = resolveCSSVariables(chartContainer, foreground || fallbackFg);\n const resolvedBg = resolveCSSVariables(chartContainer, background || fallbackBg);\n\n const fg = d3.color(resolvedFg);\n const bg = d3.color(resolvedBg);\n\n if (!fg || !bg) {\n return resolvedBg;\n }\n const contrast = getColorContrast(fg.formatHex(), bg.formatHex());\n if (contrast >= 3) {\n return bg.formatHex();\n }\n\n const invertedBg = invertHexColor(bg.formatHex());\n const invertedContrast = getColorContrast(fg.formatHex(), invertedBg);\n return invertedContrast >= 3 ? invertedBg : fallbackBg;\n}\n\nexport const ChartTable: React.FunctionComponent<ChartTableProps> = React.forwardRef<HTMLDivElement, ChartTableProps>(\n (props, forwardedRef) => {\n const { headers, rows, width, height, chartTitle } = props;\n const { chartContainerRef: _rootElem } = useImageExport(props.componentRef, true, false);\n const classes = useChartTableStyles(props);\n const arrowAttributes = useArrowNavigationGroup({ axis: 'grid' });\n\n if (!headers || headers.length === 0) {\n return <div>No data available</div>;\n }\n\n const bgColorSet = new Set<string>();\n headers.forEach(header => {\n const bg = header?.style?.backgroundColor;\n const normalized = d3.color(bg || '')?.formatHex();\n if (normalized) {\n bgColorSet.add(normalized);\n }\n });\n let sharedBackgroundColor: string | undefined;\n let useSharedBackground = false;\n\n /*\n If we have only one or two unique background colors, we can consider using a shared background color\n for the table headers. This is to ensure better contrast with the foreground text.\n For size 1, we will consider that as default color if it satisfies the contrast ratio.\n There could also be a scenario where backgroundcolor array is of size 2, for eg: [\"dimsgray\", \"gray\"],\n which will assign 1st column header bg color to dimsgray and rest to gray. so our logic of shared background\n color won't run here. So will consider for size 2 as well.\n For size greater than this, we will consider that user wants different colors and will let color contrast fail\n if any.\n */\n if (bgColorSet.size === 1 || bgColorSet.size === 2) {\n const candidateBg = bgColorSet.size === 1 ? Array.from(bgColorSet)[0] : Array.from(bgColorSet)[1];\n for (const header of headers) {\n const fg = header?.style?.color;\n if (fg && getColorContrast(fg, candidateBg) >= 3) {\n sharedBackgroundColor = candidateBg;\n useSharedBackground = true;\n break;\n }\n }\n }\n\n const titleHeight = chartTitle ? 30 : 0;\n const totalHeight = typeof height === 'number' ? height : 650;\n const tableHeight = `${totalHeight - titleHeight}px`;\n const svgWidth = typeof width === 'number' ? width : '100%';\n const titleMaxWidth = typeof width === 'number' ? width - 20 : undefined;\n const titleX = typeof width === 'number' ? width / 2 : 0;\n\n return (\n <div\n ref={el => {\n _rootElem.current = el;\n }}\n className={classes.root as string}\n style={{ height: `${totalHeight}px`, overflow: 'hidden' }}\n >\n <svg width={svgWidth} height={`${totalHeight}px`}>\n {chartTitle && (\n <ChartTitle\n title={chartTitle}\n x={titleX}\n maxWidth={titleMaxWidth}\n className={classes.chartTitle}\n titleStyles={props.titleStyles}\n tooltipClassName={classes.svgTooltip}\n />\n )}\n <foreignObject x=\"0\" y={titleHeight} width=\"100%\" height={tableHeight}>\n <div\n style={{\n maxHeight: height ? `${height}px` : '650px',\n overflowY: 'auto',\n overflowX: 'auto',\n }}\n >\n <table\n className={classes.table}\n style={{\n width: width ? `${width}px` : '100%',\n }}\n {...arrowAttributes}\n >\n <thead>\n <tr>\n {headers.map((header, idx) => {\n const style = { ...header?.style };\n const fg = style.color;\n const bg = style.backgroundColor;\n\n if (useSharedBackground) {\n style.backgroundColor = sharedBackgroundColor;\n } else if (fg || bg) {\n style.backgroundColor = getSafeBackgroundColor(_rootElem.current!, fg, bg);\n }\n return (\n <th key={idx} className={classes.headerCell} style={style} tabIndex={0}>\n {header.value}\n </th>\n );\n })}\n </tr>\n </thead>\n {rows && rows.length > 0 && (\n <tbody>\n {rows.map((row, rowIdx) => (\n <tr key={rowIdx}>\n {row.map((cell, colIdx) => {\n const style = { ...cell?.style };\n const fg = style.color;\n const bg = style.backgroundColor;\n if (fg || bg) {\n style.backgroundColor = getSafeBackgroundColor(_rootElem.current!, fg, bg);\n }\n return (\n <td key={colIdx} className={classes.bodyCell} style={style} tabIndex={0}>\n {cell.value}\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n )}\n </table>\n </div>\n </foreignObject>\n </svg>\n </div>\n );\n },\n);\n\nChartTable.displayName = 'ChartTable';\n"],"names":["React","useChartTableStyles","tokens","d3","getColorContrast","resolveCSSVariables","ChartTitle","useImageExport","useArrowNavigationGroup","invertHexColor","hex","color","colorNeutralForeground1","rgb","r","g","b","formatHex","getSafeBackgroundColor","chartContainer","foreground","background","fallbackFg","fallbackBg","colorNeutralBackground1","resolvedFg","resolvedBg","fg","bg","contrast","invertedBg","invertedContrast","ChartTable","forwardRef","props","forwardedRef","headers","rows","width","height","chartTitle","chartContainerRef","_rootElem","componentRef","classes","arrowAttributes","axis","length","div","bgColorSet","Set","forEach","header","style","backgroundColor","normalized","add","sharedBackgroundColor","useSharedBackground","size","candidateBg","Array","from","titleHeight","totalHeight","tableHeight","svgWidth","titleMaxWidth","undefined","titleX","ref","el","current","className","root","overflow","svg","title","x","maxWidth","titleStyles","tooltipClassName","svgTooltip","foreignObject","y","maxHeight","overflowY","overflowX","table","thead","tr","map","idx","th","key","headerCell","tabIndex","value","tbody","row","rowIdx","cell","colIdx","td","bodyCell","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,mBAAmB,QAAQ,+BAA+B;AACnE,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,YAAYC,QAAQ,WAAW;AAC/B,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,uBAAuB,QAAQ,0BAA0B;AAElE,SAASC,eAAeC,GAAW;IACjC,MAAMC,QAAQR,GAAGQ,KAAK,CAACD;IACvB,IAAI,CAACC,OAAO;QACV,OAAOT,OAAOU,uBAAuB;IACvC;IACA,MAAMC,MAAMF,MAAME,GAAG;IACrB,OAAOV,GAAGU,GAAG,CAAC,MAAMA,IAAIC,CAAC,EAAE,MAAMD,IAAIE,CAAC,EAAE,MAAMF,IAAIG,CAAC,EAAEC,SAAS;AAChE;AAEA,SAASC,uBAAuBC,cAA2B,EAAEC,UAAmB,EAAEC,UAAmB;IACnG,MAAMC,aAAapB,OAAOU,uBAAuB;IACjD,MAAMW,aAAarB,OAAOsB,uBAAuB;IACjD,IAAI,CAACL,gBAAgB;QACnB,OAAOI;IACT;IAEA,MAAME,aA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AW7B,QAAQ4D,QAAQ;gBAAEnD,OAAOA;gBAAO2C,UAAU;eACnEK,KAAKJ,KAAK;QAGjB;AAWtB,GACA;AAEFjE,WAAWyE,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ChartTable/ChartTable.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { Chart } from './index';\n\n/**\n * Chart Table properties\n * {@docCategory ChartTable}\n */\nexport interface ChartTableProps {\n /**\n * 1d or 2d Array of header values.\n */\n headers: { value: string | number | boolean | null; style?: React.CSSProperties }[];\n\n /**\n * Array of rows. Each row corresponds to one data entry under each column.\n */\n rows: { value: string | number | boolean | null; style?: React.CSSProperties }[][];\n\n /**\n * Optional width for the table\n * @default '100%'\n */\n width?: string | number;\n\n /**\n * Optional height for the table\n * @default '650px'\n */\n height?: string | number;\n\n /**\n * Additional class name(s) to apply to the table chart\n */\n className?: string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: ChartTableStyles;\n\n /**\n * Optional callback to access the Chart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.Ref<Chart>;\n}\n\n/**\n * Table Chart styles\n * {@docCategory ChartTable}\n */\nexport interface ChartTableStyles {\n root?: string | React.CSSProperties;\n table?: string;\n headerCell?: string;\n bodyCell?: string;\n chart?: string;\n}\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
|
|
1
|
+
{"version":3,"sources":["../src/components/ChartTable/ChartTable.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TitleStyles } from '../../utilities/Common.styles';\nimport { Chart } from './index';\n\n/**\n * Chart Table properties\n * {@docCategory ChartTable}\n */\nexport interface ChartTableProps {\n /**\n * Title styles configuration for the chart title\n */\n titleStyles?: TitleStyles;\n\n /**\n * 1d or 2d Array of header values.\n */\n headers: { value: string | number | boolean | null; style?: React.CSSProperties }[];\n\n /**\n * Array of rows. Each row corresponds to one data entry under each column.\n */\n rows: { value: string | number | boolean | null; style?: React.CSSProperties }[][];\n\n /**\n * Optional width for the table\n * @default '100%'\n */\n width?: string | number;\n\n /**\n * Optional height for the table\n * @default '650px'\n */\n height?: string | number;\n\n /**\n * Chart title to display above the table\n */\n chartTitle?: string;\n\n /**\n * Additional class name(s) to apply to the table chart\n */\n className?: string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: ChartTableStyles;\n\n /**\n * Optional callback to access the Chart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.Ref<Chart>;\n}\n\n/**\n * Table Chart styles\n * {@docCategory ChartTable}\n */\nexport interface ChartTableStyles {\n root?: string | React.CSSProperties;\n table?: string;\n headerCell?: string;\n bodyCell?: string;\n chart?: string;\n chartTitle?: string;\n svgTooltip?: string;\n}\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
|