DaddyChulo
Posts: 1
Joined: Wed Oct 05, 2022 10:00 pm

Base64 in ganizational chart

Hello, very good to everyone

I have a question, I would like to know how I could add an image to a node in Base64,
in the ganizational chart, https://www.highcharts.com/demo/organization-chart

That is, instead of the image being a URL it is base64

I hope you can help me, just for the moment, thank you very much for reading me ^^ :D
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Base64 in ganizational chart

Hi DaddyChulo!
Welcome to our forum and thanks for contacting us with your question!

I have investigated deeply in the topic and I found, that to make a working Base64 image in nodes all you need to add to your project is this line:

Code: Select all

Highcharts.AST.allowedReferences = [...Highcharts.AST.allowedReferences, 'data:image/svg+xml;base64'];

Thanks to that, you will be able to use Base64 images as links to images in your nodes.

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

Let me know if you have any further questions.
Regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Usage”