The error is about an SVG element not liking an attribute value which is supposed to be a number. I would bet your actual data sent to the chart is not what you believe it is.
You should also draw a Table chart (before the PieChart) with the same data to see what it shows when the error occurs. Or you might be able to use a debugger to work backwards to the data that resulted in the error. If you can point me an your web page that shows this problem, I might be able to help more. On Tue, Jun 13, 2017 at 10:29 PM, Shinwoo Kang <[email protected]> wrote: > Thank you for the checking. > > I use like below. > > > > > *<script type="text/javascript" > src="https://www.gstatic.com/charts/loader.js > <https://www.gstatic.com/charts/loader.js>"></script>google.charts.load('current', > {packages: ['corechart']});google.charts.setOnLoadCallback(fetchData);* > My chart is working at the first time and the error gets randomly when I > redraw the chart. > The error is "*Error: <path> attribute d: Expected number, > "MNaN,NaNLNaN,NaNA…"*" > And the error at below > > *gvjs_.zZ=function(a,b){var > c=this.qb(gvjs_sw);0<a.length&&c.setAttribute("d",a.join(""));this.Aj(c,b);return > c};*in *https://www.gstatic.com/charts/45.1/js/jsapi_compiled_format_module.js > <https://www.gstatic.com/charts/45.1/js/jsapi_compiled_format_module.js>* > > > Looks like parsing problem but the example data case is same. > var pieDataArr = [ ['Test', 'Num'], ["test1", 2], ["test2", 1], ["test3", > 1], ["test4", 1], ["test5", 0] ]; > > Do you have any idea about the error? > > Shinwoo Kang > > > 2017년 6월 13일 화요일 오후 9시 48분 20초 UTC+9, Daniel LaLiberte 님의 말: >> >> Your example appears to work fine here (after adding header row to your >> data): https://jsfiddle.net/dlaliberte/97278v8g/ >> But you didn't specify which version you were loading, or how, which >> could make a difference in how it loads. >> >> On Tue, Jun 13, 2017 at 5:17 AM, Shinwoo Kang <[email protected]> >> wrote: >> >>> Hi, >>> >>> I am using google visualization for various charts. >>> >>> I tried to draw piecharts with array data but I got the error when I use >>> draw(). >>> The problem is that I got the error randomly and rarely even though the >>> array data is same. >>> >>> Is there someone who have any ideas about it? >>> >>> Below is my work. >>> >>> ------------------------------------------------------------ >>> ------------------------------------------------------------ >>> -------------------------------- >>> var pieDataArr = [["test1", 2], ["test2", 1], ["test3", 1], ["test4", >>> 1], ["test5", 0]]; >>> >>> var data = google.visualization.arrayToDataTable(pieDataArr); >>> >>> >>> var options = { >>> title : titleOption, >>> titleTextStyle : { >>> fontSize : 15 >>> }, >>> width : chartWidth, >>> height : 400, >>> chartArea:{ >>> top : 20, >>> width : chartWidth*0.6, >>> height : 360 >>> }, >>> bar : { >>> groupWidth : 25 >>> }, >>> hAxis : { >>> maxValue : 100, >>> viewWindow : { >>> max : 100 >>> } >>> }, >>> vAxis : { >>> textStyle : { >>> fontSize : 12 >>> } >>> }, >>> 'backgroundColor' : '#f0f3f7', >>> legend:{ >>> position : 'bottom' >>> }, >>> pieSliceTextStyle : { >>> color : '#2c3520' >>> }, >>> pieHole : 0.4, >>> colors :colorMap >>> }; >>> >>> >>> var chart = new google.visualization.ChartWrapper({ >>> chartType : 'PieChart', >>> dataTable : data, >>> options : options, >>> containerId : chartId_ >>> }); >>> >>> >>> chart.draw(); >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google Visualization API" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at https://groups.google.com/grou >>> p/google-visualization-api. >>> To view this discussion on the web visit https://groups.google.com/d/ms >>> gid/google-visualization-api/6983c701-b097-4cff-b701-0edd22 >>> a89c35%40googlegroups.com >>> <https://groups.google.com/d/msgid/google-visualization-api/6983c701-b097-4cff-b701-0edd22a89c35%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> >> [email protected] 5CC, Cambridge MA >> > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to google-visualization-api@ > googlegroups.com. > Visit this group at https://groups.google.com/ > group/google-visualization-api. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/google-visualization-api/77594581-00d5-4ffa-a194- > e149f775ea98%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/77594581-00d5-4ffa-a194-e149f775ea98%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 5CC, Cambridge MA -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJOZ2n1dKveU1KGu9PSD0Vsfrm1i6zM9cPrBtN21Fm59yw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
