Home › Forums › Feature Requests & Feedback › Label Position in the middle of a stacked bar › Reply To: Label Position in the middle of a stacked bar
Please make sure that you have set indexLabelPlacement property to “inside” in both the series.
Kindly take a look at the code-snippet below,
data: [
{
indexLabel: "{y}",
indexLabelFontColor:"white",
indexLabelPlacement:"inside",
type: "stackedBar",
dataPoints: [
{ x: 10, y: 71 },
{ x: 20, y: 55},
{ x: 30, y: 50 },
{ x: 40, y: 65 },
{ x: 50, y: 95 },
{ x: 60, y: 68 },
{ x: 70, y: 48 },
{ x: 80, y: 34 },
{ x: 90, y: 44}
]
},
{
indexLabel: "{y}",
indexLabelFontColor:"white",
indexLabelPlacement:"inside",
type: "stackedBar",
dataPoints: [
{ x: 10, y: 41 },
{ x: 20, y: 55},
{ x: 30, y: 40 },
{ x: 40, y: 65 },
{ x: 50, y: 55 },
{ x: 60, y: 48 },
{ x: 70, y: 28 },
{ x: 80, y: 34 },
{ x: 90, y: 34}
]
}
]
Please take a look at this JSFiddle for an example on stackedBar chart with indexLabels placed inside.