ipsapps
Posts: 26
Joined: Tue Jul 16, 2024 12:51 pm

Data Grid HTML Caption

Hi - the caption works well with html in regular charts, but with the datagrid - it will not render HTML.

https://jsfiddle.net/jmac88/oa4kbxzh/1/

Is this intentional or is there something i'm missing?
User avatar
dawid.d
Site Moderator
Posts: 1222
Joined: Thu Oct 06, 2022 11:31 am

Re: Data Grid HTML Caption

Hi,

Thanks for the question!

Yes, it was intentional, because the text is entered as `innerText`, not `innerHTML`, for security reasons. However, I think that as a small feature we can introduce the ability to filter HTML through AST, which will allow using HTML in the title. For now, you can handle this very easily by editing the component content outside of the options, as in the demo below.

Demo: https://jsfiddle.net/BlackLabel/nb18a3ue/

I requested the feature here: https://github.com/highcharts/highcharts/issues/22487

Best regards,
Dawid Draguła
Highcharts Developer
ipsapps
Posts: 26
Joined: Tue Jul 16, 2024 12:51 pm

Re: Data Grid HTML Caption

Workaround worked well - thank you!

Return to “Highcharts Dashboards”