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: Enable Interactive Tooltips in ApexCharts #4469

Open
FADL285 opened this issue May 14, 2024 · 0 comments
Open

Feature Request: Enable Interactive Tooltips in ApexCharts #4469

FADL285 opened this issue May 14, 2024 · 0 comments
Labels
feature-request New feature or request

Comments

@FADL285
Copy link

FADL285 commented May 14, 2024

Summary

Currently, tooltips in ApexCharts hide when the mouse moves away from the chart marker, making it difficult to interact with elements within the tooltip. I propose adding an option to make tooltips interactive, allowing them to remain visible when hovered over. This would enable users to select or interact with custom content inside the tooltip without it disappearing.

API Changes

Add a new configuration option in the tooltip settings:

tooltip: {
  interactive: true // Default value: false
}

Example Usage

var options = {
  chart: {
    type: 'scatter'
  },
  series: [{
    name: 'Sample Data',
    data: [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6]]
  }],
  tooltip: {
    enabled: true,
    interactive: true,
    custom: function({ seriesIndex, dataPointIndex, w }) {
      const seriesItem = w.config.series[seriesIndex];
      return `
        <div>
          <p>${seriesItem.name}</p>
          <a href="${seriesItem.metadata.url}" target="_blank">More Info</a>
        </div>
      `;
    }
  }
};

Intended Use Case

This feature would be particularly useful for dashboards and data-driven applications where users need to interact with additional information or actions provided within the tooltip. For example, in financial charts, users could click on links for more detailed reports, or in e-commerce analytics, they could view and interact with product details directly from the tooltip. This enhancement will improve user experience by making the tooltip content more accessible and functional.

@FADL285 FADL285 added the feature-request New feature or request label May 14, 2024
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