-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[charts] Clean the axis rendering (#8948)
- Loading branch information
1 parent
d7ac79c
commit 52330d2
Showing
11 changed files
with
350 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { | ||
unstable_generateUtilityClass as generateUtilityClass, | ||
unstable_generateUtilityClasses as generateUtilityClasses, | ||
} from '@mui/utils'; | ||
|
||
export interface AxisClasses { | ||
/** Styles applied to the root element. */ | ||
root: string; | ||
/** Styles applied to the main line element. */ | ||
line: string; | ||
/** Styles applied to group ingruding the tick and its label. */ | ||
tickContainer: string; | ||
/** Styles applied to ticks. */ | ||
tick: string; | ||
/** Styles applied to ticks label. */ | ||
tickLabel: string; | ||
/** Styles applied to the axis label. */ | ||
label: string; | ||
/** Styles applied to x axes. */ | ||
directionX: string; | ||
/** Styles applied to y axes. */ | ||
directionY: string; | ||
/** Styles applied to the top axis. */ | ||
top: string; | ||
/** Styles applied to the bottom axis. */ | ||
bottom: string; | ||
/** Styles applied to the left axis. */ | ||
left: string; | ||
/** Styles applied to the right axis. */ | ||
right: string; | ||
} | ||
|
||
export type XAxisClassKey = keyof AxisClasses; | ||
|
||
export function getAxisUtilityClass(slot: string) { | ||
return generateUtilityClass('MuiAxis', slot); | ||
} | ||
|
||
export const axisClasses: AxisClasses = generateUtilityClasses('MuiAxis', [ | ||
'root', | ||
'line', | ||
'tickContainer', | ||
'tick', | ||
'tickLabel', | ||
'label', | ||
'directionX', | ||
'directionY', | ||
'top', | ||
'bottom', | ||
'left', | ||
'right', | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.