-
-
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] Replace
legend.position.horizontal
from `"left" | "middle"…
… | "right"` to `"start" | "center" | "end"` (#16315) Signed-off-by: Jose C Quintas Jr <juniorquintas@gmail.com> Co-authored-by: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com>
- Loading branch information
1 parent
a9c4eb1
commit 07201fb
Showing
28 changed files
with
430 additions
and
33 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
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
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 |
---|---|---|
@@ -1,19 +1,10 @@ | ||
export type LegendPosition = { | ||
/** | ||
* The vertical position of the legend. | ||
*/ | ||
vertical?: 'top' | 'middle' | 'bottom'; | ||
/** | ||
* The horizontal position of the legend. | ||
*/ | ||
horizontal?: 'left' | 'middle' | 'right'; | ||
}; | ||
import { Position } from '../models/position'; | ||
|
||
export type ChartsLegendPosition = { | ||
/** | ||
* The position of the legend in relation to the chart. | ||
* This property is only passed to the Chart components, e.g. `ScatterChart`, and not the slots themselves. | ||
* If customization is needed, simply use the composition pattern. | ||
*/ | ||
position?: LegendPosition; | ||
position?: Position; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export type Position = { | ||
/** | ||
* The vertical position. | ||
*/ | ||
vertical?: 'top' | 'middle' | 'bottom'; | ||
/** | ||
* The horizontal position. | ||
*/ | ||
horizontal?: 'start' | 'center' | 'end'; | ||
}; |
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
5 changes: 5 additions & 0 deletions
5
...es/x-codemod/src/v8.0.0/charts/rename-legend-position-type/actual-nested-imports.spec.tsx
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,5 @@ | ||
import { LegendPosition } from '@mui/x-charts/ChartsLegend'; | ||
|
||
const legendPosition: LegendPosition = {}; | ||
type LegendPositionType = {} & LegendPosition; | ||
interface LegendPositionProps extends LegendPosition {} |
11 changes: 11 additions & 0 deletions
11
...ages/x-codemod/src/v8.0.0/charts/rename-legend-position-type/actual-root-imports.spec.tsx
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,11 @@ | ||
/* eslint-disable no-restricted-imports */ | ||
import { LegendPosition } from '@mui/x-charts'; | ||
import { LegendPosition as LegendPositionPro } from '@mui/x-charts-pro'; | ||
|
||
const legendPosition: LegendPosition = {}; | ||
type LegendPositionType = {} & LegendPosition; | ||
interface LegendPositionProps extends LegendPosition {} | ||
|
||
const legendPositionPro: LegendPositionPro = {}; | ||
type LegendPositionProType = {} & LegendPositionPro; | ||
interface LegendPositionProProps extends LegendPositionPro {} |
5 changes: 5 additions & 0 deletions
5
.../x-codemod/src/v8.0.0/charts/rename-legend-position-type/expected-nested-imports.spec.tsx
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,5 @@ | ||
import { Position } from '@mui/x-charts/models'; | ||
|
||
const legendPosition: Position = {}; | ||
type LegendPositionType = {} & Position; | ||
interface LegendPositionProps extends Position {} |
11 changes: 11 additions & 0 deletions
11
...es/x-codemod/src/v8.0.0/charts/rename-legend-position-type/expected-root-imports.spec.tsx
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,11 @@ | ||
/* eslint-disable no-restricted-imports */ | ||
import { Position } from '@mui/x-charts'; | ||
import { Position as LegendPositionPro } from '@mui/x-charts-pro'; | ||
|
||
const legendPosition: Position = {}; | ||
type LegendPositionType = {} & Position; | ||
interface LegendPositionProps extends Position {} | ||
|
||
const legendPositionPro: LegendPositionPro = {}; | ||
type LegendPositionProType = {} & LegendPositionPro; | ||
interface LegendPositionProProps extends LegendPositionPro {} |
Oops, something went wrong.