-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[charts-pro] Allow zoom interactions to be configured #18646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
JCQuintas
merged 58 commits into
mui:master
from
JCQuintas:zoom-configuration-simplified
Sep 25, 2025
Merged
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
95fe3d7
add keys and mode handling
JCQuintas 261a655
simplify proptypes
JCQuintas 602ad37
add tests
JCQuintas dfa7f42
docs
JCQuintas 2934bdf
fix types
JCQuintas 96966fa
Merge commit 'fac25a0892692bb0e3e1e25274d85a20ff9cee5b' into zoom-con…
JCQuintas f2b29a2
split zoom interactions
JCQuintas b0226d0
improve configuration and rename props
JCQuintas 07cbeee
Merge commit 'dbd436ed10bee05e2decc6578587ffca527c33b5' into zoom-con…
JCQuintas c64ef57
export pmode
JCQuintas 36bf78f
impl
JCQuintas 1e6ca49
add logic
JCQuintas d97d83f
export
JCQuintas 15f27ce
Merge commit 'd97d83f47baed0f19eff1da0cd2c853e2ce0dfee' into zoom-con…
JCQuintas 669695f
allow multiconfig
JCQuintas 9840ae7
improve docs
JCQuintas d05d8f7
fix behaviour to align with expectation
JCQuintas dff7a90
Merge branch 'master' into zoom-configuration-simplified
JCQuintas 667a268
Update docs/data/charts/zoom-and-pan/zoom-and-pan.md
JCQuintas cbeb4e1
Merge commit '7f540b1d48d7facac5dcf5b53ddb404185e9449c' into zoom-con…
JCQuintas 62f40a0
fix type
JCQuintas 4a4326f
fix lint
JCQuintas 59f0491
fix types
JCQuintas 9b20308
sugg
JCQuintas 2300dc3
simplify types
JCQuintas a681945
retro
JCQuintas f701ba7
fix type issues
JCQuintas 0cbcfd3
fix requiredkeys not working in some instances
JCQuintas dc758f2
scripts
JCQuintas db2944a
ts
JCQuintas 90546a5
fix ts error using anyentry
JCQuintas 8da2f5d
update params when they change
JCQuintas 31ba823
Merge branch 'master' into zoom-configuration-simplified
JCQuintas 53a48d0
try revert
JCQuintas b8bd625
Revert "try revert"
JCQuintas 1490d65
Revert "update params when they change"
JCQuintas 08e4f42
use layout effect
JCQuintas 1271e0c
eff
JCQuintas 3cfe653
ZoomConfig > ZoomInteractionConfig
JCQuintas 6e8f7d5
scripts
JCQuintas ae305e9
remove comment
JCQuintas 8ccde7f
Merge commit '112c08f2efbeb0480c764e2946d4168c921a2a2a' into zoom-con…
JCQuintas aa84499
fix missing refs
JCQuintas b4be924
Merge branch 'master' into zoom-configuration-simplified
JCQuintas 627ff1f
Merge branch 'master' into zoom-configuration-simplified
JCQuintas 3411313
522c115
fix config clarity and memoization on all interactions
JCQuintas 2292df4
Merge branch 'master' into zoom-configuration-simplified
JCQuintas 40d8f9c
test
JCQuintas 8be2e5b
memo obj
JCQuintas 6165ef7
Revert "memo obj"
JCQuintas f78ae17
test change in place
JCQuintas 14126c0
add hook and logic
JCQuintas af02063
custom hooks
JCQuintas 44133e5
fixes
JCQuintas 408df54
remove on
JCQuintas 14c24e9
Merge commit 'ba2428ddee2c58391609580c2c4effdcaa316d88' into zoom-con…
JCQuintas 1f330b1
scripts
JCQuintas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
13 changes: 13 additions & 0 deletions
13
...ges/x-charts-pro/src/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.ts
This file contains hidden or 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,13 @@ | ||
import { createSelector } from '@mui/x-charts/internals'; | ||
import { selectorChartZoomState } from './useChartProZoom.selectors'; | ||
import type { ZoomInteractionName, PanInteractionName } from './ZoomInteractionConfig.types'; | ||
|
||
export const selectorZoomInteractionConfig = createSelector( | ||
[selectorChartZoomState, (_state, interactionName: ZoomInteractionName) => interactionName], | ||
(zoomState, interactionName) => zoomState.zoomInteractionConfig.zoom[interactionName] ?? null, | ||
); | ||
|
||
export const selectorPanInteractionConfig = createSelector( | ||
[selectorChartZoomState, (_state, interactionName: PanInteractionName) => interactionName], | ||
(zoomState, interactionName) => zoomState.zoomInteractionConfig.pan[interactionName] ?? null, | ||
); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.