Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show a column with the value Zero in Column chart in Highcharts?

Which I am passing to:

       series: [{
                        name: 'Fixed bugs',
                        data: fixed,
                        pointWidth: 40
                    }, {
                        name: 'Assigned Bugs',
                        data:assigned,
                        pointWidth: 40
                    }, {
                        name: 'Re-Opened Bugs',
                        data: Reopened,
                        pointWidth: 40
                    },
                    {
                        name: 'Closed Bugs',
                        data: closed,
                        pointWidth: 40
                    }]

to this chart and I have the data like this :

     data: fixed=[3,5,5,8]
    data:assigned=[0,1,0,0] 

and follows. Now I want to show the column with zero value to... For me its not showing the column value with zero.

like image 918
SoftwareNerd Avatar asked Aug 31 '12 06:08

SoftwareNerd


2 Answers

minPointLength will work. Use this.

plotOptions: {
    column: {
    minPointLength: 3
    }
}
like image 84
Thilaga Avatar answered Oct 15 '22 03:10

Thilaga


You can do this quite simply with the minPointLength option. It sets the minimum number of pixels per column, default is 0, so zero values don't show up. It's in the docs here.

Try this JSFiddle

like image 23
desired login Avatar answered Oct 15 '22 03:10

desired login



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!