frappe / charts

Simple, responsive, modern SVG Charts with zero dependencies
https://frappe.io/charts
MIT License
14.9k stars 716 forks source link

How to declare HTML for charts' labels? #411

Open davidbgk opened 1 year ago

davidbgk commented 1 year ago

Expected Behaviour

I would like to be able to define this: labels: ['<a>2023-04-27</a>','<a>2023-04-27</a>'] (with real links but you get the point) and having links rendered as labels of the axis.

Actual Behaviour

Links are escaped before rendering:

Capture d’écran, le 2023-05-01 à 15 42 00

You can see in devtools that the link part is considered as text (vs. HTML) within the svg text element:

Capture d’écran, le 2023-05-01 à 15 43 14

Frappé Charts version: 1.6.2

davidbgk commented 1 year ago

Note that the link is rendered as HTML within the tooltip but you cannot click it because the tooltip vanishes when you move from the point of the graph.