提交 e43a58c9 编写于 作者: P pissang

fix(pie): fix error when there is no data.

上级 800ba5b8
......@@ -261,9 +261,9 @@ class PieView extends ChartView {
let startAngle: number;
// First render
if (!oldData) {
if (!oldData && data.count() > 0) {
let shape = data.getItemLayout(0) as graphic.Sector['shape'];
for (let s = 1; isNaN(shape.startAngle) && s < data.count(); ++s) {
for (let s = 1; isNaN(shape && shape.startAngle) && s < data.count(); ++s) {
shape = data.getItemLayout(s);
}
if (shape) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册