I am doing an interactive graph using reportlab. Each bar on the chart is a link to information related to the data represented by this bar, and this functionality works well.
When I hover over a panel, I see the URL that the panel refers to. I would like to add text to this “tooltip”, for example, the name of the webpage I am linking to.
I looked through several mailing list threads and searched for the reportlab user guide, but I can not find anything that gives a definitive answer. Is it possible?
from reportlab.pdfgen import canvas
from reportlab.lib.units import inch
c = canvas.Canvas("hover.pdf")
c.rect(0*inch, 0*inch, 1*inch, 1*inch, fill=1)
c.linkURL('http://google.com', (0*inch, 0*inch, 1*inch, 1*inch), relative=1)
c.showPage()
c.save()
source
share