Changing the color of a single column in highcharts has been a challenge for me. Even though I can change it for the entire series, figuring out how to do it for just one column has proven difficult. Here is how my series is created:
var dates = [];
var scores = [];
vm.data.values.forEach(function (item) {
dates.push(datefilter(item.date, 'yyyy-MM'));
if (item.isCurrent) {
scores.push({
y: item.score || 0,
marker: {
fillColor: '#FF0000',
lineWidth: 5,
lineColor: "#FF0000"
}
});
}
else {
scores.push(item.score || 0);
}
});
vm.chartConfig = {
options: {
chart: {
type: 'column'
},
plotOptions: {
series: {
cursor: 'pointer'
},
marker: {
lineWidth: 1,
symbol: 'circle'
}
}
}
},
title: {
text: "Scores"
},
xAxis: {
categories: dates
},
yAxis: {
title: {
text: null
}
},
series: [
{
name: 'Scores',
data: scores,
color: "#249858"
}
]
};
};
The HTML code of the component is as follows:
<highchart config="vm.chartConfig"></highchart>
Despite my efforts, I have only managed to see one color that I set in the chartConfig object. The custom color set during the creation of series data in the loop does not seem to apply. Any guidance or a link to a Plunker demo would be greatly appreciated.