Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highchart X-axis truncate shows weird characters

I'm having a problem with the truncation of the highcharts x-axis labels. In my website when the labels truncate it shows this weird characters in this image

My website

When I use the same exact code in JSFiddle it seems to work ok and instead of the weird characters it displays the ... like it should

JSFiddle

Has anybody had the same problem? I'm using the same imports and the same jQuery version in JSFiddle.

I thought this may be a problem of encoding but I'm using UTF-8 for the encoding as in the JSFiddle.

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

Here is the JSFiddle link, I hope that somebody can help me.

Thanks in advance!

like image 349
pedromendessk Avatar asked Apr 17 '15 10:04

pedromendessk


1 Answers

Ok, after all Paweł Fus was right on the first comment he made

Make sure your HTML file is also encoded in UTF-8. And try to use file directly from Highcharts CDN, not local files - maybe when saving file it was converted to CP1250 or something similar.


The problem was solved by saving the highcharts libs as UTF-8.

To do that I had to change the encoding of eclipse like it's said here How to change default text file encoding in Eclipse? and then I saved the .js files.

like image 180
pedromendessk Avatar answered Oct 01 '22 08:10

pedromendessk