Reputation: 375
I have a chartjs doughnut chart which is displaying fine, but when printed as a pdf, the tooltips don't show.
I've tried targeting .tooltip
class within an @media print{}
block, but this didn't work. I tried some implementation with custom
property in the tooltip options but nothing I've tried worked at all.
Does anyone have a solution, where the tooltips will either always persist, or can be persisted when printing the HTML page to a pdf?
Thanks,
Upvotes: 0
Views: 300
Reputation: 31371
I think you might be better off using the data labels plugin, will give your chart a cleaner look instead of having a tooltip active for each element: https://chartjs-plugin-datalabels.netlify.app/samples/charts/doughnut.html
Upvotes: 1