I'm trying to create a formatting function outside of config, and calling in return for formatter. But it is not working. let color = "red"; xAxis: { labels: { formatter: function (e) { return '<span style="color:' + color + '">' + e.value + '</span>'; }, }
I'm trying to create a formatting function outside of config, and calling in return for formatter. But it is not working.
let color = "red";
xAxis: {
labels: {
formatter: function (e) {
return '' + e.value + '';
},
}