@fluentui/react-charts 9.3.26 → 9.3.28
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 +34 -2
- package/dist/index.d.cts +61 -5
- package/dist/index.d.ts +61 -5
- package/lib/components/AreaChart/AreaChart.js +33 -3
- package/lib/components/AreaChart/AreaChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +6 -0
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/ChartPopover.js +2 -1
- package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.js +1 -0
- package/lib/components/GanttChart/GanttChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js +33 -12
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +25 -25
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +1 -0
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/components/Legends/Legends.js +15 -18
- package/lib/components/Legends/Legends.js.map +1 -1
- package/lib/components/Legends/OverflowMenu.js +13 -10
- package/lib/components/Legends/OverflowMenu.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +17 -13
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +2 -1
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +1 -0
- package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +1 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +52 -44
- package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +2 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/types/DataPoint.js.map +1 -1
- package/lib/utilities/test-data/specialChartNames.js +11 -0
- package/lib/utilities/test-data/specialChartNames.js.map +1 -0
- package/lib/utilities/utilities.js +4 -1
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.cjs +33 -3
- package/lib-commonjs/components/AreaChart/AreaChart.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.cjs +6 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.cjs.map +1 -1
- package/lib-commonjs/components/CommonComponents/ChartPopover.cjs +2 -1
- package/lib-commonjs/components/CommonComponents/ChartPopover.cjs.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.cjs +1 -0
- package/lib-commonjs/components/GanttChart/GanttChart.cjs.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.cjs +33 -12
- package/lib-commonjs/components/GaugeChart/GaugeChart.cjs.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.cjs.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.cjs +24 -23
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.cjs.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.cjs +1 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.cjs.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs +2 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs.map +1 -1
- package/lib-commonjs/components/Legends/Legends.cjs +15 -17
- package/lib-commonjs/components/Legends/Legends.cjs.map +1 -1
- package/lib-commonjs/components/Legends/OverflowMenu.cjs +12 -9
- package/lib-commonjs/components/Legends/OverflowMenu.cjs.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.cjs +17 -13
- package/lib-commonjs/components/LineChart/LineChart.cjs.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.cjs +2 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.cjs.map +1 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.cjs +1 -0
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.cjs.map +1 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.cjs +52 -44
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.cjs.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.cjs +2 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.cjs.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.cjs +1 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.cjs.map +1 -1
- package/lib-commonjs/types/DataPoint.cjs.map +1 -1
- package/lib-commonjs/utilities/test-data/specialChartNames.cjs +21 -0
- package/lib-commonjs/utilities/test-data/specialChartNames.cjs.map +1 -0
- package/lib-commonjs/utilities/utilities.cjs +4 -1
- package/lib-commonjs/utilities/utilities.cjs.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,43 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-charts
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on Mon,
|
|
3
|
+
<!-- This log was last generated on Mon, 19 Oct 2026 14:49:10 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.3.28](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v9.3.28)
|
|
8
|
+
|
|
9
|
+
Mon, 19 Oct 2026 14:49:10 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.27..@fluentui/react-charts_v9.3.28)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- fix: prevent Legends overflow crashes after dynamic item changes ([PR #36691](https://github.com/microsoft/fluentui/pull/36691) by 171317405+jakesalvesen@users.noreply.github.com)
|
|
15
|
+
- fix: improve LineChart and GaugeChart callout behavior and formatting ([PR #36739](https://github.com/microsoft/fluentui/pull/36739) by atisjai@microsoft.com)
|
|
16
|
+
- Preserve special category and series names and legend selection across charts; deprecate legacy grouped dataset types while retaining compatibility ([PR #36710](https://github.com/microsoft/fluentui/pull/36710) by paulmardling@microsoft.com)
|
|
17
|
+
- fix(react-charts): read only own transform data fields and preserve special output keys while retaining ordinary row coercion ([PR #36718](https://github.com/microsoft/fluentui/pull/36718) by paulmardling@microsoft.com)
|
|
18
|
+
- fixed tooltip value cut off at the bottom in HorizontalBarChartWithAxis ([PR #36818](https://github.com/microsoft/fluentui/pull/36818) by v-baambati@microsoft.com)
|
|
19
|
+
- Fixed voice control accessibility issue for the chart line and area charts ([PR #36703](https://github.com/microsoft/fluentui/pull/36703) by v-baambati@microsoft.com)
|
|
20
|
+
- Bump @fluentui/react-button to v9.11.2 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
21
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
22
|
+
- Bump @fluentui/react-overflow to v9.9.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
23
|
+
- Bump @fluentui/react-popover to v9.14.10 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
24
|
+
- Bump @fluentui/react-tabster to v9.26.19 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
25
|
+
- Bump @fluentui/react-tooltip to v9.10.8 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
26
|
+
- Bump @fluentui/react-utilities to v9.27.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
27
|
+
|
|
28
|
+
## [9.3.27](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v9.3.27)
|
|
29
|
+
|
|
30
|
+
Wed, 23 Sep 2026 09:04:33 GMT
|
|
31
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.26..@fluentui/react-charts_v9.3.27)
|
|
32
|
+
|
|
33
|
+
### Patches
|
|
34
|
+
|
|
35
|
+
- Bump @fluentui/react-popover to v9.14.9 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
36
|
+
- Bump @fluentui/react-tooltip to v9.10.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
37
|
+
|
|
7
38
|
## [9.3.26](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v9.3.26)
|
|
8
39
|
|
|
9
|
-
|
|
40
|
+
Tue, 22 Sep 2026 11:25:39 GMT
|
|
10
41
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.25..@fluentui/react-charts_v9.3.26)
|
|
11
42
|
|
|
12
43
|
### Patches
|
|
@@ -15,6 +46,7 @@ Mon, 21 Sep 2026 16:12:52 GMT
|
|
|
15
46
|
- fix(react-charts): prevent prototype pollution in chart data grouping ([PR #36715](https://github.com/microsoft/fluentui/pull/36715) by v-baambati@microsoft.com)
|
|
16
47
|
- fixed prototypr issue in vegalite adapter ([PR #36743](https://github.com/microsoft/fluentui/pull/36743) by v-baambati@microsoft.com)
|
|
17
48
|
- Added test cases prototype pollution fix ([PR #36737](https://github.com/microsoft/fluentui/pull/36737) by v-baambati@microsoft.com)
|
|
49
|
+
- feat: allow a function for the cartesian tickFormat so the numeric value axis can render a literal % or route through an app/i18n formatter (string behavior unchanged) ([PR #36369](https://github.com/microsoft/fluentui/pull/36369) by michael@xerilium.com)
|
|
18
50
|
- Bump @fluentui/react-button to v9.11.1 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
19
51
|
- Bump @fluentui/react-jsx-runtime to v9.4.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
20
52
|
- Bump @fluentui/react-overflow to v9.9.4 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
package/dist/index.d.cts
CHANGED
|
@@ -387,11 +387,16 @@ export declare interface CartesianChartProps {
|
|
|
387
387
|
*/
|
|
388
388
|
tickValues?: number[] | Date[] | string[] | undefined;
|
|
389
389
|
/**
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
390
|
+
* Format for x-axis tick labels. Accepts either a d3-format string or a `(value) => string` function.
|
|
391
|
+
*
|
|
392
|
+
* String: a d3-time-format specifier for date axes (e.g. `'%m/%d'`) or a d3-format specifier for
|
|
393
|
+
* numeric axes. See https://github.com/d3/d3-time-format and https://github.com/d3/d3-format.
|
|
394
|
+
*
|
|
395
|
+
* Function: formats the tick value directly — useful when a d3-format string is insufficient,
|
|
396
|
+
* e.g. appending a literal `%` to an already-0–100 axis (d3's `%` type multiplies by 100),
|
|
397
|
+
* or routing ticks through an app/i18n formatter. For y-axis format use `yAxisTickFormat`.
|
|
393
398
|
*/
|
|
394
|
-
tickFormat?: string;
|
|
399
|
+
tickFormat?: string | ((value: number | Date) => string);
|
|
395
400
|
/**
|
|
396
401
|
* Width of line stroke
|
|
397
402
|
*/
|
|
@@ -1576,8 +1581,18 @@ export declare interface EventsAnnotationProps {
|
|
|
1576
1581
|
mergedLabel: (count: number) => string;
|
|
1577
1582
|
}
|
|
1578
1583
|
|
|
1584
|
+
/**
|
|
1585
|
+
* GaugeChart segment data with its calculated range.
|
|
1586
|
+
* {@docCategory GaugeChart}
|
|
1587
|
+
*/
|
|
1579
1588
|
export declare interface ExtendedSegment extends GaugeChartSegment {
|
|
1589
|
+
/**
|
|
1590
|
+
* Start of the segment range.
|
|
1591
|
+
*/
|
|
1580
1592
|
start: number;
|
|
1593
|
+
/**
|
|
1594
|
+
* End of the segment range.
|
|
1595
|
+
*/
|
|
1581
1596
|
end: number;
|
|
1582
1597
|
}
|
|
1583
1598
|
|
|
@@ -1848,6 +1863,10 @@ export declare interface GaugeChartCalloutData {
|
|
|
1848
1863
|
* Legend of the segment or gauge element that opened the callout.
|
|
1849
1864
|
*/
|
|
1850
1865
|
legend: string;
|
|
1866
|
+
/**
|
|
1867
|
+
* Title of the gauge.
|
|
1868
|
+
*/
|
|
1869
|
+
chartTitle?: string;
|
|
1851
1870
|
/**
|
|
1852
1871
|
* Current value of the gauge.
|
|
1853
1872
|
*/
|
|
@@ -1864,12 +1883,23 @@ export declare interface GaugeChartCalloutData {
|
|
|
1864
1883
|
* Formatted current value displayed in the default callout.
|
|
1865
1884
|
*/
|
|
1866
1885
|
chartValueLabel: string;
|
|
1886
|
+
/**
|
|
1887
|
+
* Gauge segments with their calculated ranges.
|
|
1888
|
+
*/
|
|
1889
|
+
segments?: GaugeChartCalloutSegment[];
|
|
1867
1890
|
/**
|
|
1868
1891
|
* Segment values displayed in the default callout.
|
|
1869
1892
|
*/
|
|
1870
1893
|
segmentValues: YValueHover[];
|
|
1871
1894
|
}
|
|
1872
1895
|
|
|
1896
|
+
/**
|
|
1897
|
+
* GaugeChart segment data provided to a custom callout renderer.
|
|
1898
|
+
* @deprecated Use `ExtendedSegment` instead.
|
|
1899
|
+
* {@docCategory GaugeChart}
|
|
1900
|
+
*/
|
|
1901
|
+
export declare type GaugeChartCalloutSegment = ExtendedSegment;
|
|
1902
|
+
|
|
1873
1903
|
/**
|
|
1874
1904
|
* Gauge Chart properties
|
|
1875
1905
|
* {@docCategory GaugeChart}
|
|
@@ -1919,6 +1949,8 @@ export declare interface GaugeChartProps {
|
|
|
1919
1949
|
hideMinMax?: boolean;
|
|
1920
1950
|
/**
|
|
1921
1951
|
* Format of the chart value
|
|
1952
|
+
* A custom formatter applies to the chart value and the current value in the callout.
|
|
1953
|
+
* Use `onRenderCallout` to customize units for segment ranges.
|
|
1922
1954
|
* @defaultvalue GaugeValueFormat.Percentage
|
|
1923
1955
|
*/
|
|
1924
1956
|
chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string);
|
|
@@ -2107,6 +2139,12 @@ export declare const getColorFromToken: (token: string, isDarkTheme?: boolean) =
|
|
|
2107
2139
|
|
|
2108
2140
|
export declare function getContrastTextColor(backgroundColor: string, isDarkTheme?: boolean): string;
|
|
2109
2141
|
|
|
2142
|
+
/**
|
|
2143
|
+
* Returns a GaugeChart segment label formatted for the chart's value format.
|
|
2144
|
+
* {@docCategory GaugeChart}
|
|
2145
|
+
*/
|
|
2146
|
+
export declare const getGaugeChartSegmentLabel: (segment: ExtendedSegment, minValue: number, maxValue: number, variant: GaugeChartVariant | undefined, chartValueFormat: GaugeChartProps["chartValueFormat"], isAriaLabel?: boolean) => string;
|
|
2147
|
+
|
|
2110
2148
|
export declare const getInvertedTextColor: (color: string, isDarkTheme?: boolean) => string;
|
|
2111
2149
|
|
|
2112
2150
|
export declare const getNextColor: (index: number, offset?: number, isDarkTheme?: boolean) => string;
|
|
@@ -2287,6 +2325,13 @@ export declare interface GVBarChartSeriesPoint {
|
|
|
2287
2325
|
barLabel?: string;
|
|
2288
2326
|
}
|
|
2289
2327
|
|
|
2328
|
+
/**
|
|
2329
|
+
* Legacy grouped-chart dataset entry, retained with its original index signature for existing consumers.
|
|
2330
|
+
* The chart no longer uses this type internally. Existing imports and values remain valid.
|
|
2331
|
+
*
|
|
2332
|
+
* @deprecated For new grouped bar series data, use GVBarChartSeriesPoint.
|
|
2333
|
+
* It is not a drop-in replacement for this legacy dictionary shape.
|
|
2334
|
+
*/
|
|
2290
2335
|
export declare interface GVDataPoint {
|
|
2291
2336
|
/**
|
|
2292
2337
|
* This interface used for - While forming datapoints from given prop "data" in code
|
|
@@ -2303,6 +2348,13 @@ export declare interface GVForBarChart {
|
|
|
2303
2348
|
[key: string]: GVBarChartSeriesPoint;
|
|
2304
2349
|
}
|
|
2305
2350
|
|
|
2351
|
+
/**
|
|
2352
|
+
* Legacy grouped-chart dataset dictionary, retained with its original index signature for existing consumers.
|
|
2353
|
+
* The chart no longer uses this type internally. Existing imports and values remain valid.
|
|
2354
|
+
*
|
|
2355
|
+
* @deprecated For new grouped chart input, use GroupedVerticalBarChartData.
|
|
2356
|
+
* It is not a drop-in replacement for this legacy dictionary shape.
|
|
2357
|
+
*/
|
|
2306
2358
|
export declare interface GVSingleDataPoint {
|
|
2307
2359
|
/**
|
|
2308
2360
|
* While forming datapoints from given prop "data" in code.
|
|
@@ -3545,7 +3597,7 @@ export declare interface ModifiedCartesianChartProps extends CartesianChartProps
|
|
|
3545
3597
|
*/
|
|
3546
3598
|
tickParams?: {
|
|
3547
3599
|
tickValues?: number[] | Date[] | string[];
|
|
3548
|
-
tickFormat?: string;
|
|
3600
|
+
tickFormat?: string | ((value: number | Date) => string);
|
|
3549
3601
|
};
|
|
3550
3602
|
/**
|
|
3551
3603
|
* it's padding between bar's or lines in the graph
|
|
@@ -3585,6 +3637,10 @@ export declare interface ModifiedCartesianChartProps extends CartesianChartProps
|
|
|
3585
3637
|
* Callback method used when mouse leaves the chart boundary.
|
|
3586
3638
|
*/
|
|
3587
3639
|
onChartMouseLeave?: () => void;
|
|
3640
|
+
/**
|
|
3641
|
+
* Callback method used when focus leaves the chart boundary.
|
|
3642
|
+
*/
|
|
3643
|
+
onChartBlur?: () => void;
|
|
3588
3644
|
/** Callback method to get extra margins for domain */
|
|
3589
3645
|
getDomainMargins?: (containerWidth: number) => Margins;
|
|
3590
3646
|
/** Callback method to get extra margins for Y-axis domain */
|
package/dist/index.d.ts
CHANGED
|
@@ -387,11 +387,16 @@ export declare interface CartesianChartProps {
|
|
|
387
387
|
*/
|
|
388
388
|
tickValues?: number[] | Date[] | string[] | undefined;
|
|
389
389
|
/**
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
390
|
+
* Format for x-axis tick labels. Accepts either a d3-format string or a `(value) => string` function.
|
|
391
|
+
*
|
|
392
|
+
* String: a d3-time-format specifier for date axes (e.g. `'%m/%d'`) or a d3-format specifier for
|
|
393
|
+
* numeric axes. See https://github.com/d3/d3-time-format and https://github.com/d3/d3-format.
|
|
394
|
+
*
|
|
395
|
+
* Function: formats the tick value directly — useful when a d3-format string is insufficient,
|
|
396
|
+
* e.g. appending a literal `%` to an already-0–100 axis (d3's `%` type multiplies by 100),
|
|
397
|
+
* or routing ticks through an app/i18n formatter. For y-axis format use `yAxisTickFormat`.
|
|
393
398
|
*/
|
|
394
|
-
tickFormat?: string;
|
|
399
|
+
tickFormat?: string | ((value: number | Date) => string);
|
|
395
400
|
/**
|
|
396
401
|
* Width of line stroke
|
|
397
402
|
*/
|
|
@@ -1576,8 +1581,18 @@ export declare interface EventsAnnotationProps {
|
|
|
1576
1581
|
mergedLabel: (count: number) => string;
|
|
1577
1582
|
}
|
|
1578
1583
|
|
|
1584
|
+
/**
|
|
1585
|
+
* GaugeChart segment data with its calculated range.
|
|
1586
|
+
* {@docCategory GaugeChart}
|
|
1587
|
+
*/
|
|
1579
1588
|
export declare interface ExtendedSegment extends GaugeChartSegment {
|
|
1589
|
+
/**
|
|
1590
|
+
* Start of the segment range.
|
|
1591
|
+
*/
|
|
1580
1592
|
start: number;
|
|
1593
|
+
/**
|
|
1594
|
+
* End of the segment range.
|
|
1595
|
+
*/
|
|
1581
1596
|
end: number;
|
|
1582
1597
|
}
|
|
1583
1598
|
|
|
@@ -1848,6 +1863,10 @@ export declare interface GaugeChartCalloutData {
|
|
|
1848
1863
|
* Legend of the segment or gauge element that opened the callout.
|
|
1849
1864
|
*/
|
|
1850
1865
|
legend: string;
|
|
1866
|
+
/**
|
|
1867
|
+
* Title of the gauge.
|
|
1868
|
+
*/
|
|
1869
|
+
chartTitle?: string;
|
|
1851
1870
|
/**
|
|
1852
1871
|
* Current value of the gauge.
|
|
1853
1872
|
*/
|
|
@@ -1864,12 +1883,23 @@ export declare interface GaugeChartCalloutData {
|
|
|
1864
1883
|
* Formatted current value displayed in the default callout.
|
|
1865
1884
|
*/
|
|
1866
1885
|
chartValueLabel: string;
|
|
1886
|
+
/**
|
|
1887
|
+
* Gauge segments with their calculated ranges.
|
|
1888
|
+
*/
|
|
1889
|
+
segments?: GaugeChartCalloutSegment[];
|
|
1867
1890
|
/**
|
|
1868
1891
|
* Segment values displayed in the default callout.
|
|
1869
1892
|
*/
|
|
1870
1893
|
segmentValues: YValueHover[];
|
|
1871
1894
|
}
|
|
1872
1895
|
|
|
1896
|
+
/**
|
|
1897
|
+
* GaugeChart segment data provided to a custom callout renderer.
|
|
1898
|
+
* @deprecated Use `ExtendedSegment` instead.
|
|
1899
|
+
* {@docCategory GaugeChart}
|
|
1900
|
+
*/
|
|
1901
|
+
export declare type GaugeChartCalloutSegment = ExtendedSegment;
|
|
1902
|
+
|
|
1873
1903
|
/**
|
|
1874
1904
|
* Gauge Chart properties
|
|
1875
1905
|
* {@docCategory GaugeChart}
|
|
@@ -1919,6 +1949,8 @@ export declare interface GaugeChartProps {
|
|
|
1919
1949
|
hideMinMax?: boolean;
|
|
1920
1950
|
/**
|
|
1921
1951
|
* Format of the chart value
|
|
1952
|
+
* A custom formatter applies to the chart value and the current value in the callout.
|
|
1953
|
+
* Use `onRenderCallout` to customize units for segment ranges.
|
|
1922
1954
|
* @defaultvalue GaugeValueFormat.Percentage
|
|
1923
1955
|
*/
|
|
1924
1956
|
chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string);
|
|
@@ -2107,6 +2139,12 @@ export declare const getColorFromToken: (token: string, isDarkTheme?: boolean) =
|
|
|
2107
2139
|
|
|
2108
2140
|
export declare function getContrastTextColor(backgroundColor: string, isDarkTheme?: boolean): string;
|
|
2109
2141
|
|
|
2142
|
+
/**
|
|
2143
|
+
* Returns a GaugeChart segment label formatted for the chart's value format.
|
|
2144
|
+
* {@docCategory GaugeChart}
|
|
2145
|
+
*/
|
|
2146
|
+
export declare const getGaugeChartSegmentLabel: (segment: ExtendedSegment, minValue: number, maxValue: number, variant: GaugeChartVariant | undefined, chartValueFormat: GaugeChartProps["chartValueFormat"], isAriaLabel?: boolean) => string;
|
|
2147
|
+
|
|
2110
2148
|
export declare const getInvertedTextColor: (color: string, isDarkTheme?: boolean) => string;
|
|
2111
2149
|
|
|
2112
2150
|
export declare const getNextColor: (index: number, offset?: number, isDarkTheme?: boolean) => string;
|
|
@@ -2287,6 +2325,13 @@ export declare interface GVBarChartSeriesPoint {
|
|
|
2287
2325
|
barLabel?: string;
|
|
2288
2326
|
}
|
|
2289
2327
|
|
|
2328
|
+
/**
|
|
2329
|
+
* Legacy grouped-chart dataset entry, retained with its original index signature for existing consumers.
|
|
2330
|
+
* The chart no longer uses this type internally. Existing imports and values remain valid.
|
|
2331
|
+
*
|
|
2332
|
+
* @deprecated For new grouped bar series data, use GVBarChartSeriesPoint.
|
|
2333
|
+
* It is not a drop-in replacement for this legacy dictionary shape.
|
|
2334
|
+
*/
|
|
2290
2335
|
export declare interface GVDataPoint {
|
|
2291
2336
|
/**
|
|
2292
2337
|
* This interface used for - While forming datapoints from given prop "data" in code
|
|
@@ -2303,6 +2348,13 @@ export declare interface GVForBarChart {
|
|
|
2303
2348
|
[key: string]: GVBarChartSeriesPoint;
|
|
2304
2349
|
}
|
|
2305
2350
|
|
|
2351
|
+
/**
|
|
2352
|
+
* Legacy grouped-chart dataset dictionary, retained with its original index signature for existing consumers.
|
|
2353
|
+
* The chart no longer uses this type internally. Existing imports and values remain valid.
|
|
2354
|
+
*
|
|
2355
|
+
* @deprecated For new grouped chart input, use GroupedVerticalBarChartData.
|
|
2356
|
+
* It is not a drop-in replacement for this legacy dictionary shape.
|
|
2357
|
+
*/
|
|
2306
2358
|
export declare interface GVSingleDataPoint {
|
|
2307
2359
|
/**
|
|
2308
2360
|
* While forming datapoints from given prop "data" in code.
|
|
@@ -3545,7 +3597,7 @@ export declare interface ModifiedCartesianChartProps extends CartesianChartProps
|
|
|
3545
3597
|
*/
|
|
3546
3598
|
tickParams?: {
|
|
3547
3599
|
tickValues?: number[] | Date[] | string[];
|
|
3548
|
-
tickFormat?: string;
|
|
3600
|
+
tickFormat?: string | ((value: number | Date) => string);
|
|
3549
3601
|
};
|
|
3550
3602
|
/**
|
|
3551
3603
|
* it's padding between bar's or lines in the graph
|
|
@@ -3585,6 +3637,10 @@ export declare interface ModifiedCartesianChartProps extends CartesianChartProps
|
|
|
3585
3637
|
* Callback method used when mouse leaves the chart boundary.
|
|
3586
3638
|
*/
|
|
3587
3639
|
onChartMouseLeave?: () => void;
|
|
3640
|
+
/**
|
|
3641
|
+
* Callback method used when focus leaves the chart boundary.
|
|
3642
|
+
*/
|
|
3643
|
+
onChartBlur?: () => void;
|
|
3588
3644
|
/** Callback method to get extra margins for domain */
|
|
3589
3645
|
getDomainMargins?: (containerWidth: number) => Margins;
|
|
3590
3646
|
/** Callback method to get extra margins for Y-axis domain */
|
|
@@ -592,13 +592,14 @@ export const AreaChart = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
|
592
592
|
graph.push(/*#__PURE__*/ React.createElement("g", {
|
|
593
593
|
key: `${index}-dots-${_uniqueIdForGraph}`,
|
|
594
594
|
clipPath: "url(#clip)",
|
|
595
|
-
role: "
|
|
595
|
+
role: "listbox",
|
|
596
596
|
"aria-label": `${points[index].legend}, series ${index + 1} of ${points.length} with ${points[index].data.length} data points.`
|
|
597
597
|
}, singleStackedData.map((singlePoint, pointIndex)=>{
|
|
598
598
|
const circleId = `${_circleId}_${index * _data[0].length + pointIndex}`;
|
|
599
599
|
const xDataPoint = singlePoint.xVal instanceof Date ? singlePoint.xVal.getTime() : singlePoint.xVal;
|
|
600
600
|
lineColor = points[index].color;
|
|
601
601
|
const legend = points[index].legend;
|
|
602
|
+
const { opacity: circleOpacity, radius: circleRadiusValue } = _getCircleOpacityAndRadius(xDataPoint, circleRadius, circleId, legend);
|
|
602
603
|
return /*#__PURE__*/ React.createElement("circle", {
|
|
603
604
|
key: circleId,
|
|
604
605
|
id: circleId,
|
|
@@ -608,14 +609,16 @@ export const AreaChart = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
|
608
609
|
stroke: lineColor,
|
|
609
610
|
strokeWidth: 3,
|
|
610
611
|
fill: _updateCircleFillColor(xDataPoint, lineColor, circleId),
|
|
612
|
+
// Elements with visibility: hidden cannot receive focus, so use opacity: 0 instead to hide them.
|
|
613
|
+
opacity: circleOpacity,
|
|
611
614
|
onMouseOut: _onRectMouseOut,
|
|
612
615
|
onMouseOver: (event)=>_onRectMouseMove(event),
|
|
613
616
|
..._getOnClickHandler(points, index, pointIndex),
|
|
614
617
|
onFocus: (event)=>_handleFocus(event, index, pointIndex, circleId),
|
|
615
618
|
onBlur: _handleBlur,
|
|
616
619
|
...getSecureProps(pointOptions),
|
|
617
|
-
r:
|
|
618
|
-
role: "
|
|
620
|
+
r: circleRadiusValue,
|
|
621
|
+
role: "option",
|
|
619
622
|
"aria-label": !_hasDuplicateXValues && !_hasMissingXValues && _getAriaLabel(index, pointIndex) || undefined
|
|
620
623
|
});
|
|
621
624
|
})));
|
|
@@ -683,6 +686,32 @@ export const AreaChart = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
|
683
686
|
return 0;
|
|
684
687
|
}
|
|
685
688
|
}
|
|
689
|
+
function _getCircleOpacityAndRadius(xDataPoint, circleRadius, circleId, legend) {
|
|
690
|
+
// Hide points whose legend isn't highlighted.
|
|
691
|
+
if (!_noLegendHighlighted() && !_legendHighlighted(legend)) {
|
|
692
|
+
return {
|
|
693
|
+
opacity: 0,
|
|
694
|
+
radius: 0
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
if (isCircleClicked && nearestCircleToHighlight === xDataPoint) {
|
|
698
|
+
return {
|
|
699
|
+
opacity: 1,
|
|
700
|
+
radius: 1
|
|
701
|
+
};
|
|
702
|
+
} else if (nearestCircleToHighlight === xDataPoint || activePoint === circleId) {
|
|
703
|
+
return {
|
|
704
|
+
opacity: 1,
|
|
705
|
+
radius: circleRadius
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
// Keep focusable points full-size but transparent (opacity:0, not visibility:hidden) so Voice Control
|
|
709
|
+
// can target them while they stay visually hidden and remain focusable.
|
|
710
|
+
return {
|
|
711
|
+
opacity: 0,
|
|
712
|
+
radius: circleRadius
|
|
713
|
+
};
|
|
714
|
+
}
|
|
686
715
|
/**
|
|
687
716
|
* This function checks if the given legend is highlighted or not.
|
|
688
717
|
* A legend can be highlighted in 2 ways:
|
|
@@ -899,6 +928,7 @@ export const AreaChart = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
|
899
928
|
createStringYAxis: createStringYAxis,
|
|
900
929
|
getmargins: _getMargins,
|
|
901
930
|
onChartMouseLeave: _handleChartMouseLeave,
|
|
931
|
+
onChartBlur: _handleChartMouseLeave,
|
|
902
932
|
getMinMaxOfYAxis: _getMinMaxOfYAxis,
|
|
903
933
|
enableFirstRenderOptimization: props.enablePerfOptimization && _firstRenderOptimization,
|
|
904
934
|
componentRef: cartesianChartRef,
|