Skip to content
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

Add Separate Configuration Options for Mouse Selection Zoom and Toolbar Zoom #4925

Open
mslowin opened this issue Jan 23, 2025 · 0 comments
Open
Labels
feature-request New feature or request

Comments

@mslowin
Copy link

mslowin commented Jan 23, 2025

Summary

Currently, the zoom property in ApexCharts does not allow separate configuration for mouse selection zoom (zoomed area selection) and the zoom toolbar. When zoom.enabled is set to true, both zooming options (mouse selection and toolbar) are enabled. When set to false, both are disabled. I propose adding a way to enable or disable these zooming options independently to allow more flexibility in chart interaction.

API Changes

I propose introducing two separate configuration options under the zoom property that could look like this:

zoom: {
    enableToolbar: true, // Enable or disable the zoom toolbar
    enableZoomedAreaSelection: false // Enable or disable zoom via mouse selection
}

By default, the "enableZoomedAreaSelection" property could remain 'true' to retain backward compatibility.

Intended Use Case

This proposal would be useful for scenarios where zoom control needs to be restricted to specific methods. For example, in dashboards where precise control is required, users might want to rely only on the toolbar for zooming, as mouse selection could inadvertently result in errors. Separating these options would enhance the user experience by allowing developers to provide more controlled and predictable chart interactions.

This would also cater to use cases where toolbar functionality (like zoom in/out buttons) is needed without enabling zoom via mouse selection, which could conflict with other interactivity on the chart.

@mslowin mslowin added the feature-request New feature or request label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant