chinmaymk / angular-charts

angular directives for creating common charts using d3
MIT License
1.03k stars 270 forks source link

Avoid 0 value in pie chart. #143

Open fizerkhan opened 9 years ago

fizerkhan commented 9 years ago

I draw pie chart with following data

[
    {
        "x": "Chrome",
        "y": [
            9
        ],
        "tooltip": "Chrome"
    },
    {
        "x": "Others",
        "y": [
            0
        ],
        "tooltip": "Others"
    }
]

It draws piechart that show 0 value with small white area. Is there any option to not showing 0 value in pie chart?

chaosfinity commented 9 years ago

Are you not getting path attribute errors with this data? On my end the pie chart will not draw unless there is one >0 value in y[0]

fizerkhan commented 9 years ago

Yes, Sorry. I changed the first value to 9

chaosfinity commented 9 years ago

This is a bug and should be fixed in the next release

fizerkhan commented 9 years ago

@chaosfinity Thanks for the quick fix.