This is a migrated thread and some comments may be shown as answers.

Pie Chart Bug: When there is only one item and this item's value is 0

2 Answers 88 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Chuanlong
Top achievements
Rank 1
Chuanlong asked on 17 Jun 2014, 03:56 AM
Hi,

I found that when draw a pie chart, there is only one item in data source, and this item's value is 0. It will result with no chart drawing and the percentage will show "NaN". I suppose it's a bug.


    var kendoPieDict = {

        title: { text: "Pie Chart"},
        legend: { position: "right" },
        seriesDefaults: {
            labels: {
                template: "#= category # - #= kendo.format('{0:P}', percentage) #",
                position: "outsideEnd",
                visible: true,
                background: "transparent"
            }
        },
        series: [{
            type: "pie",
            data: [{category: "category1", value: 0}]
        }],
        tooltip: {
            template: "#= category # - #= kendo.format('{0:P}', percentage) #",
            visible: true
        }
    }; 

$("#chart").kendoChart(kendoPieDict );









2 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 18 Jun 2014, 02:09 PM
Hi Chuanlong,

Thank you for pointed our attention to this issue - it appears there is a bug in the current version of Kendo UI Pie Chart, however we will do our best to address it as soon as possible. Please excuse us for the inconvenience caused.

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Chuanlong
Top achievements
Rank 1
answered on 14 Aug 2014, 07:02 AM
Glad you guys will fix it.
Tags
Charts
Asked by
Chuanlong
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Chuanlong
Top achievements
Rank 1
Share this question
or