Reputation: 3
I got some problem with Highcharts transition between 9.x and 10.x version. I can't get color of series inside function in tooltip formatter.
tooltip: {
formatter: function () {
return this.points.reduce(function (s, point) {
return s + '<br/>' + "<span style='color:" + point.series.color + "'>\u25CF</span> " + point.series.name + ': ' +
point.y + 'm';
}, '<b>' + this.x + '</b>');
},
...
This is related to Belchertown weewx's skin issue. Please have a look to that FIDDLE Thanks. Onza
Upvotes: 0
Views: 58
Reputation: 3695
Thank you for reporting this behaviour! I've created a github issue, that you can track here: https://github.com/highcharts/highcharts/issues/17627
Use another quotation marks configuration to achieve the correct tooltip format:
formatter: function () {
return this.points.reduce(function (s, point) {
return s + '<br/>' + '<span style="color:' + point.series.color + '">\u25CF</span>' + point.series.name + ': ' +
point.y + 'm';
}, '<b>' + this.x + '</b>');
},
Demo: https://jsfiddle.net/BlackLabel/a2uLhdys/
Upvotes: 0