Skip to content

Make chart data point links clickable - #1450

Merged
81reap merged 13 commits into
mainfrom
fix-chart-tooltip-link-hover
Sep 29, 2026
Merged

81reap merged 13 commits into
mainfrom
fix-chart-tooltip-link-hover

Conversation

@lovasoa

@lovasoa lovasoa commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Chart rows can include a link. Clicking a linked data point opens its URL. When ApexCharts displays a text X value as the tooltip title, that title is also a real link; ApexCharts renders the rest of the tooltip normally. Numeric and date titles keep their native formatting without a tooltip link, and charts without an X title retain point-click navigation.

The tooltip remains open while the pointer moves onto a title link, using ApexCharts 7.6.0's tooltip.interactive option.

Validation

  • npm run format
  • npm test
  • npm run build
  • Playwright chart fixtures: 47 passed

Closes #945.

@lovasoa
lovasoa marked this pull request as draft September 12, 2026 22:13
* feat(chart): add links to data point tooltips

* fix(chart): keep linked tooltips interactive

* fix(chart): keep point links on their rows

* fix(chart): format custom tooltip values

* test(chart): cover links across tooltip types

* style(chart): use camel case for tooltip helper

* test(chart): remove unused serialization fixture

* fix(chart): keep tooltip links accessible

* docs(changelog): file the point link entry under unreleased

* fix(chart): link every slice of a pie chart
@lovasoa
lovasoa force-pushed the fix-chart-tooltip-link-hover branch from d08ca20 to 3945c7b Compare September 12, 2026 22:22
@lovasoa
lovasoa marked this pull request as ready for review September 25, 2026 20:39
@lovasoa
lovasoa requested a review from 81reap September 28, 2026 07:19

@81reap 81reap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you rebase and fix the merge conflicts? If we can resolve the visual tooltip discrepancy then this PR LGTM!

Comment thread frontend/src/apexcharts.js Outdated
Comment thread examples/official-site/sqlpage/migrations/01_documentation.sql
@lovasoa

lovasoa commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator Author

Following up on the tooltip review: agreed. Linked charts now let ApexCharts render its native tooltip. When a linked point has a text X value displayed as the tooltip title, tooltip.x.formatter makes just that title ("Tom" here) a real link. The marker, value, and layout remain the same.

The tradeoff is deliberate: an X formatter replaces ApexCharts' own numeric/date formatting, so we only enable it for text X values. Numeric and date titles remain unlinked; pie and scatter have no native X title to link. Point-click navigation remains in place. This avoids a duplicate tooltip renderer and any observer or DOM patching.

Same chart without a link, then with a link:

Native tooltip without a link

Native tooltip with linked Tom title

@81reap
81reap merged commit d6aa8f0 into main Sep 29, 2026
52 checks passed
@81reap

81reap commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

ope, I squashed cuz of the 13 commits. Didn't realize it auto appends co-author tags. sorry @lovasoa will be more vigilant of this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chart component : link parameter

2 participants