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

[FEATURE REQUEST] When the mouse passes over the chart, the userOptions operation menu is displayed #148

Closed
FearlessPeople opened this issue Dec 25, 2024 · 5 comments · Fixed by #149
Labels
enhancement New feature or request

Comments

@FearlessPeople
Copy link

Is your feature request related to a problem? Please describe.
In a dashboard scenario, there are multiple charts, and if each chart defaults to displaying the userOptions operation menu, it is obviously not very aesthetically pleasing.

Describe the solution you'd like

When the mouse passes over the chart, the userOptions operation menu is displayed

Describe alternatives you've considered
I once considered not displaying userOptions by default and adding the onmouseover event myself, but this only displayed the thumbnail menu of userOptions without expanding the button. I think this effect is not very good

Additional context
image

@graphieros
Copy link
Owner

graphieros commented Dec 25, 2024

@FearlessPeople

A precision before I consider working on your good suggestion:

When the mouse enters the chart:

  • only the burger menu is displayed. It is still necessary to click on it to open the menu. I don't wish to force its open state when hovering the chart

When the mouse leaves the chart:

  • 2 outcomes are possible: state of the user options menu is maintained or not

I'm considering adding 2 config options for userOptions:

userOptions: {
  ...,
  showOnChartHover: boolean; // default: false, to keep current behavior and avoid breaking change
  keepStateOnChartLeave: boolean; // default: true, to keep current behavior and avoid breaking change
}

Let me know if you have additional ideas before I work on this.

@graphieros graphieros added the enhancement New feature or request label Dec 25, 2024
@FearlessPeople
Copy link
Author

Thank you, I think the two additional configuration items you added should meet my needs

@graphieros
Copy link
Owner

@FearlessPeople

Ok great.
The basic feature is ready, but today is special (Christmas) so expect the update to be shipped tomorrow.

@FearlessPeople
Copy link
Author

@graphieros Great, I'm glad to hear that the basic feature is ready. I understand it's Christmas today, so no worries! I'll look forward to the update being shipped tomorrow. Wishing you a Merry Christmas and a joyful holiday season!

@graphieros graphieros linked a pull request Dec 26, 2024 that will close this issue
@graphieros
Copy link
Owner

graphieros commented Dec 26, 2024

Hi @FearlessPeople

You can upgrade to v2.4.52+ to use the updated configuration.

userOptions: {
  show: boolean, // Not new. Has to be true for these new options to be applied. Is true by default
  showOnChartHover: boolean; // New option. Default: false. Set to true to only show the burger menu when hovering the component
  keepStateOnChartLeave: boolean; // New option. Default: true. Set to false to always close the menu when hovering out the component
}

Documentation website is up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants