简体   繁体   中英

Highcharts - Unable to see all labels on the bar charts

All the labels on the x-Axis of the chart are not visible, I can see that the chart correctly populating, the tool tip also shows correct xAxis point.

All I want is each and every label on the x-Axis should appear. I am creating a BAR graph.

Example graph - http://jsfiddle.net/HsLCn/

See the miss category label on x-axis.

series: [{
            name: 'John',
            data: [[3,5], [1,3], [0,4], [2,7], [4,2]]
        }, {
            name: 'Jane',
            data: [[2,5], [1,3], [0,4], [3,7], [4,2]]
        }, {
            name: 'Joe',
            data: [[3,5], [1,3], [0,4], [2,7], [4,2]]
        }]

Please take look at crop option, which probably is a reason of your problem

http://api.highcharts.com/highstock#plotOptions.series.dataLabels.crop

EDIT: xAxis labels are not displayed, because data is not sorted by x, ascending

http://jsfiddle.net/HsLCn/3/

 series: [{
            name: 'John',
            data: [[0,4],[1,3],[2,7],[3,5],[4,2]]
        }, {
            name: 'Jane',
            data: [[0,4],[1,3],[2,5], [3,7], [4,2]]
        }, {
            name: 'Joe',
            data: [ [0,4],[1,3], [2,7],[3,5], [4,2]]
        }]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM