angular-charts
angular-charts copied to clipboard
Error: Invalid value for <text> attribute transform="translate(NaN,NaN)"
I tried to draw pie chart with following data
[
{
"x": "Chrome",
"y": [
0
],
"tooltip": "Chrome"
},
{
"x": "Firefox",
"y": [
0
],
"tooltip": "Firefox"
},
{
"x": "Safari",
"y": [
0
],
"tooltip": "Safari"
},
{
"x": "IE",
"y": [
0
],
"tooltip": "IE"
},
{
"x": "Opera",
"y": [
0
],
"tooltip": "Opera"
},
{
"x": "Others",
"y": [
0
],
"tooltip": "Others"
}
]
Since all the values are 0, it throws error: Invalid value for
With this error you have labels on correct?
Yes, i labelled them correct. If i change any one of the value other than zero(0), it works fine. No error in the console. it only happens if everything is 0 value.
Since the arcs have not startAngle and endAngle it cannot calculate a point to place the labels. This error should be suppressed in the next release
@chaosfinity Thanks for the fix.