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

Possible new bug with donut charts that are passed an empty array of data

3 Answers 60 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 19 Jun 2017, 07:48 AM

It looks like in the latest version of the Kendo UI for Angular charts module (kendo-angular-charts) there is a new issue with the donut chart.

If the donut chart is passed an empty array of data it crashes with the message "Cannot read property 'sector' of undefined."

I made this plunker from the donut example in the docs to demonstrate the issue: http://plnkr.co/edit/Zv9Vx9Jxfx2KsZLRYCe5?p=preview

Previous versions of the donut chart were able to handle empty arrays of data.

Looking at the code there is no check for an empty points array in the function setDonutCenter.

e.prototype.setDonutCenter = function() {
                if (this.instance && this.options && this.options.series) {
                    var t = this.options.series[0];
                    if (t && "donut" === t.type) {
                        var e = this.instance._plotArea.charts[0].points[0].sector
                          , n = e.innerRadius
                          , r = e.center.y - n
                          , o = e.center.x - n
                          , i = 2 * n;
                        this.donutCenterStyle = {
                            height: i + "px",
                            left: o + "px",
                            top: r + "px",
                            width: i + "px"
                        }
                    }
                }
            }

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Topalov
Telerik team
answered on 21 Jun 2017, 06:58 AM
Hi Simon,

Thank you for bringing this issue to our attention. It is logged, and will be fixed in an upcoming release of the Kendo UI for Angular Charts package. You can track the issue in our public GitHub repository:

https://github.com/telerik/kendo-angular/issues/672

I am sorry for any inconvenience caused, and I have also updated your Telerik points for helping us improve the quality of our product.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Simon
Top achievements
Rank 1
answered on 22 Jun 2017, 08:47 AM
Thanks. In future, if I bump into an other issue that I'm pretty sure is a bug should I post it in these forums first or just create a GitHub issue?
0
Dimiter Topalov
Telerik team
answered on 26 Jun 2017, 07:08 AM
Hi Simon,

Typically we log the issues we are aware of in the GitHub repository, so if a possible bug is not listed there, you can log it there.

Alternatively, you can also start a new support thread, and we will investigate the issue, and if it is a bug we will log it in the GitHub repository ourselves.

You can choose whichever approach is more convenient for you. Thank you in advance.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Charts
Asked by
Simon
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Simon
Top achievements
Rank 1
Share this question
or