質問

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.

役に立ちましたか?

解決

Here is a way to do it - although I think just having the column be zero-valued and not visible is the best way.

Find a very very low number that none of your data points would ever have but still keep it >0. Let us say it is .005. When you bring in your data any value that is 0 assign it this .005 value. In your tooltip formatter do an IF on the value. If it is .005 then make it 0. This way you get to see the "zero" column but the tooltip displayed will be 0 as well. If you are doing any kind of calculation on the stacked columns then you need to account for this non-0 0 value in there as well.

他のヒント

minPointLength will work. Use this.

plotOptions: {
    column: {
    minPointLength: 3
    }
}

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

Not sure what you are trying to display, but maybe you could try to show the datalabels like this:

plotOptions: {
    series: {
        dataLabels: {
            enabled: true,
            color: 'gray'
        }
    }
}

Attempt at demo

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top