jb3_2
Posts: 48
Joined: Wed Sep 20, 2017 12:05 pm

No-break-spaces as prefix in ColorAxis Names do not export

Hi, I'm trying to format colorAxis dataClass names really nicely, with good success so far - the only thing that's missing is that the prefixed no-break-spaces in colorAxis.dataClass.name are removed upon exporting to e.g. png.

Here's the fiddle: http://jsfiddle.net/jb3_2/Lxs5g265/

If you export the map as a png, the spaces before the first colorAxis dataClass name are removed:
Highcharts-nbsp-prefix-removed-upon-export.png
Highcharts-nbsp-prefix-removed-upon-export.png (11 KiB) Viewed 545 times
Any idea how I could achieve a perfect export without using exporting.allowHTML=true (since I do not want svg files with text as foreignObject because of IE and Chrome problems when zooming)? If this is not possible, could this be added to a future version of Highmaps?

Thanks for your great product!
J.
ppotaczek
Posts: 751
Joined: Mon Oct 02, 2017 3:12 pm

Re: No-break-spaces as prefix in ColorAxis Names do not expo

Hi jb3_2,

I reproduced your legend on different map, because of slow performance. Way out of this situation is to insert invisible span element instead of no-break-spaces. Please check the result.

Code: Select all

"name": "<span style='color: rgba(0,0,0,0)'>36,0</span> ≥ 36,0"
Live demo: http://jsfiddle.net/BlackLabel/t08d2bbc/

Best regards!
Paweł Potaczek,
Highcharts Developer
jb3_2
Posts: 48
Joined: Wed Sep 20, 2017 12:05 pm

Re: No-break-spaces as prefix in ColorAxis Names do not expo

Great answer, highly apprecieated! Thanks a lot, Pawel.

Return to “Highcharts Maps”