I want to add a red line on each stackbar. Refer the pic below.
If you notice in the picture there is a red line on top of each stackbar. I have tried many workaround but none of them works. Could anybody have idea how to achieve this?
Pasting the sample code.
this.graphData.graphRef = new Chart({
chart: {
type: 'column',
height: this.graphHeight
},
xAxis: {
categories: this.graphData.column,
labels: {
useHTML: true,
}
},
yAxis: {
min: 0,
stackLabels: {
enabled: true,
rotation: 270,
x: -16,
y: 160,
style: {
fontWeight: 'bold',
color: 'black'
}
}
},
plotOptions: {
column: {
stacking: 'normal',
pointPadding: 0.3,
dataLabels: {
enabled: false,
color: '#000',
style: {
textOutline: '0px',
fontSize: '10px',
fontWeight: 'none'
}
},
pointWidth: 30
},
...
series: [
{
name: 'CBG',
data: [15,20, 14, 20],
stack: 'P',
zIndex: i
},
...
{
name: 'CBG',
data: [15, 23, 14, 20],
stack: 'R',
zIndex: i
},
...
{
name: 'CBG',
data: [25, 23, 24, 20],
stack: 'A/C',
zIndex: i
},
...
{
name: 'CBG',
data: [25, 23, 14, 20],
stack: 'E',
zIndex: i
},
...
]
});
Any help or suggestion is appreciated. Thanks!
UPDATED
For ex. let assume the red line is called as CBG. if the CBG of stackbar P of Q1FY2020 Group is 1500 then the red line should be drawn over the stack where Y axis is 1500. Hope you understood.