mirelon
mirelon

Reputation: 4996

Highcharts - second xAxis labels are not displayed

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:

http://jsfiddle.net/UTPR7/1/

$(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

Answers (1)

Sebastian Bochan
Sebastian Bochan

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://jsfiddle.net/UTPR7/2/

http://api.highcharts.com/highcharts#series.xAxis

Upvotes: 2

Related Questions