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]: External Trigger for Tooltip in Chart Components #877

Open
kronos1345 opened this issue Dec 20, 2023 · 3 comments
Open

[Feature]: External Trigger for Tooltip in Chart Components #877

kronos1345 opened this issue Dec 20, 2023 · 3 comments
Labels
Type: Enhancement Small enhancement to existing component or feature

Comments

@kronos1345
Copy link

What problem does this feature solve?

This feature request is for the capability to externally trigger tooltips in chart components, such as DonutChart. The primary use case is to allow tooltips to be activated when interacting with elements outside of the chart, like a list of data points. For instance, clicking on a data point in a separate list should activate the corresponding tooltip in the DonutChart.

Importance and Rationale:
This feature will enhance the interactivity and cohesion between different UI components, significantly improving user experience. It allows for more flexible and interactive data visualization, as users can receive detailed information about a chart segment not only by hovering over it but also through external interactions.

What does the proposed API look like?

<DonutChart
  data={...}
  category="..."
  index="..."
  // Other props
  externalTooltipTrigger={this.state.activeDataPoint} // Newly proposed prop
/>

In this proposal, the externalTooltipTrigger prop would take an identifier (like a data point name or index) that corresponds to a specific segment in the chart. When this prop is updated, the corresponding tooltip in the chart would become active, mirroring the behavior as if the user hovered over the segment itself.

This approach maintains current tooltip functionality while adding the flexibility to activate tooltips from external interactions, bridging the gap between different components and making data exploration more intuitive and user-friendly.

@kronos1345
Copy link
Author

@severinlandolt Will you be working on this subject?

@severinlandolt
Copy link
Member

severinlandolt commented Dec 26, 2023

Hey @kronos1345, will take this into our next API discussion. But from a first glance, makes total sense! Thanks for you feedback 🙏

@severinlandolt severinlandolt added the Type: Enhancement Small enhancement to existing component or feature label Jan 9, 2024
@abdelkd
Copy link
Contributor

abdelkd commented Feb 29, 2024

I think this is similar to #876 which already has a PR #982 . I think of changing the props so there'd be another prop showLegend in order to make both this issue and #876 . If any changes needed to PR let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Small enhancement to existing component or feature
Projects
None yet
Development

No branches or pull requests

3 participants