You can use two xAxis
with categories. For example:
xAxis: [{
opposite: true,
lineWidth: 0,
categories: ['Start', 'Category1', 'Category2', 'Category3', 'Category4', 'Balance']
}, {
linkedTo: 0,
lineWidth: 0,
categories: ['', 'Sub-Category 1', 'Liquid 1<br>Liquid 2', 'Gas 1<br>Gas 2', 'Solid 1', ''],
labels: {
rotation: 0,
y: -10
}
}]
Live demo: https://jsfiddle.net/BlackLabel/a9bzeqw4/1/
API Reference: https://api.highcharts.com/highcharts/xAxis.labels
Thankyou. This is what I was looking for.!
How do I give a different color for the bar in the negative region and another color for the same bar in the positive region for isSum bar ?
You can use
upColor
: api.highcharts.com/highcharts/series.waterfall.upColor andnegativeColor
: api.highcharts.com/highcharts/series.waterfall.negativeColor properties.