I have a Highcharts chart which is, for some reason, showing odd characters before the series title only on the data point pop up. I am using the default popup and highcharts 4.0.1.
I currently set all series to have the title hi
to ensure nothing in my code was messing this up. Also if I output countsGraph.series[0].name
I also get hi
.
What is causing this? Unfortunately I cannot make a fiddle at the moment as my access to HighCharts.com is playing up.
Here is how I create the series
// Create new series if requried
if (!series[c]) {
series[c] = {
name: "hi",
data: []
};
}
Most probably you are using different coding than UTF-8. You can simply remove that character, by changing pointFormat
, from:
<span style="color:{series.color}">\u25CF</span> {series.name}: <b>{point.y}</b><br/>
to:
<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>
Or, as just @Adam Goodwin
pointed out, set default format in your options:
<span style="color:{series.color}">\u25CF</span> {series.name}: <b>{point.y}</b><br/>
I had the same issue. Encoding in Notepad++ was set to 'UTF-8 without BOM'. When I switched it to 'UTF-8' it fixed it. Thanks!
UPDATE - that had some undesirable effects on other stuff, so I ended up adding to the html:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" / >
and that fixed it all
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With