ant-design-blazor / ant-design-blazor/ant-design-charts-blazor

TypeError: Cannot read properties of undefined (reading 'length')

Open
#150 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
186
Forks
44
PR merge metrics
No merged PRs in 30d

Description

ant-design-charts-blazor.js:46
TypeError: Cannot read properties of undefined (reading 'length')

第一个打开页面正常,关掉浏览器再打开就报上面的错误。

代码





#region Example 1

readonly object[] data1 =
{
new
{
type = "Error",
value = 27
},
new
{
type = "Info",
value = 25
},
new
{
type = "Warm",
value = 18
}

};

readonly PieConfig config1 = new PieConfig
{
Radius = 0.8,
AngleField = "value",
ColorField = "type",
Label = new PieLabelConfig
{
Visible = true,
Type = "inner"
},
Color = new string[] { "#ff4d4f", "#1890ff", "#faad14" },
Width=260,
Height=260

};

#endregion Example 1

LineConfig config2 = new LineConfig
{
Padding = "auto",
XField = "year",
YField = "value",
Height=180
// XAxis = new ValueCatTimeAxis
// {
// Type = "dateTime",
// TickCount = 5
// }
};

object[] data2 =
{
new {year = "1991", value = 3},
new {year = "1992", value = 4},
new {year = "1993", value = 3.5},
new {year = "1994", value = 5},
new {year = "1995", value = 4.9},
new {year = "1996", value = 6},
new {year = "1997", value = 7},
new {year = "1998", value = 9},
new {year = "1999", value = 13}
};

}

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.