Make chart data point links clickable - #1450
Conversation
* 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
d08ca20 to
3945c7b
Compare
81reap
left a comment
There was a problem hiding this comment.
can you rebase and fix the merge conflicts? If we can resolve the visual tooltip discrepancy then this PR LGTM!
|
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, 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: |
|
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 |


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.interactiveoption.Validation
npm run formatnpm testnpm run buildCloses #945.