Skip to content

Commit 347ee2a

Browse files
authored
[charts] Allow tabIndex in surface and legend (#18344)
1 parent b0c279f commit 347ee2a

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

packages/x-charts/src/ChartsLegend/ChartsLegend.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export interface ChartsLegendProps {
3535
classes?: Partial<ChartsLegendClasses>;
3636
className?: string;
3737
sx?: SxProps<Theme>;
38+
tabIndex?: number;
3839
}
3940

4041
const RootElement = styled('ul', {

packages/x-charts/src/ChartsLegend/ContinuousColorLegend.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export interface ContinuousColorLegendProps
6666
classes?: Partial<ContinuousColorLegendClasses>;
6767
className?: string;
6868
sx?: SxProps<Theme>;
69+
tabIndex?: number;
6970
}
7071

7172
const templateAreas = (reverse?: boolean) => {

packages/x-charts/src/ChartsLegend/PiecewiseColorLegend.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export interface PiecewiseColorLegendProps
5656
classes?: Partial<PiecewiseColorLegendClasses>;
5757
className?: string;
5858
sx?: SxProps<Theme>;
59+
tabIndex?: number;
5960
}
6061

6162
const RootElement = styled('ul', {

packages/x-charts/src/ChartsSurface/ChartsSurface.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ import {
1212
selectorChartPropsSize,
1313
} from '../internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors';
1414

15-
export interface ChartsSurfaceProps {
15+
export interface ChartsSurfaceProps
16+
extends Omit<
17+
React.SVGProps<SVGSVGElement>,
18+
'id' | 'children' | 'className' | 'height' | 'width' | 'cx' | 'cy' | 'viewBox' | 'color' | 'ref'
19+
> {
1620
className?: string;
1721
title?: string;
1822
desc?: string;

0 commit comments

Comments
 (0)