-
-
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] Make typescript more flexible about plugins and their params (…
…#16478) Co-authored-by: Jose Quintas <[email protected]>
- Loading branch information
1 parent
7805988
commit d8f2691
Showing
24 changed files
with
340 additions
and
435 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
28 changes: 28 additions & 0 deletions
28
packages/x-charts-pro/src/BarChartPro/BarChartPro.plugins.ts
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,28 @@ | ||
import { | ||
useChartZAxis, | ||
UseChartZAxisSignature, | ||
useChartCartesianAxis, | ||
UseChartCartesianAxisSignature, | ||
useChartInteraction, | ||
UseChartInteractionSignature, | ||
useChartHighlight, | ||
UseChartHighlightSignature, | ||
ConvertSignaturesIntoPlugins, | ||
} from '@mui/x-charts/internals'; | ||
import { useChartProZoom, UseChartProZoomSignature } from '../internals/plugins/useChartProZoom'; | ||
|
||
export type BarChartProPluginsSignatures = [ | ||
UseChartZAxisSignature, | ||
UseChartCartesianAxisSignature<'bar'>, | ||
UseChartInteractionSignature, | ||
UseChartHighlightSignature, | ||
UseChartProZoomSignature, | ||
]; | ||
|
||
export const BAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<BarChartProPluginsSignatures> = [ | ||
useChartZAxis, | ||
useChartCartesianAxis, | ||
useChartInteraction, | ||
useChartHighlight, | ||
useChartProZoom, | ||
]; |
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
47 changes: 25 additions & 22 deletions
47
packages/x-charts-pro/src/ChartContainerPro/useChartContainerProProps.ts
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.