Reputation: 4996
I have a bar chart with two sets of data. Inspired by the variant from http://www.highcharts.com/demo/bar-negative-stack, the only difference is that the two sets of data have different set of categories. The second xAxis now don't use the linkedTo
attribute and I wonder why the labels are not displayed:
$(document).ready(function() {
$('#container').highcharts({
chart: {
type: 'bar'
},
xAxis: [{
categories: ['A','B','C']
}, {
opposite: true,
categories: ['D','E','F']
}],
plotOptions: {
series: {
stacking: 'normal'
}
},
series: [{
data: [-1746181, -1884428, -2089758]
}, {
data: [1656154, 1787564, 1981671]
}]
});
});
Upvotes: 0
Views: 4175
Reputation: 37578
It doesn't display any values, because no series is linked to this xAxis. You need to set xAxis
parameter for the first or second series.
http://api.highcharts.com/highcharts#series.xAxis
Upvotes: 2