That’s easy enough to work around, thanks. On Friday, December 13, 2013 12:21:06 PM UTC-8, Sergey wrote: > > Hi, we're terribly sorry for the inconvenience that this is causing you. > We will fix this as soon as we can. In the meantime, this error is occuring > because you are passing a number (chosenYears[y]) where we expect a string > (it is a column label). This was ok until now because before JavaScript > would just cast it to a string where needed, but in the new version we > attempted to call .split() on it. That is what's causing your error. Until > we push the fix, you can fix this error yourself by specifying the column > labels as strings. > > - Sergey > > > On Fri, Dec 13, 2013 at 3:06 PM, Tim McLenegan > <[email protected]<javascript:> > > wrote: > >> I had a simple line chart that had been working fine for months, but has >> recently stopped working. This may be related to the new API update, but I >> am not sure. The page it is on is infrequently accessed. >> >> In Safari, the API’s red error message reports the obtuse error “'undefined' >> is not a function (evaluating 'a[sc](je)')”, and in Chrome the error >> reads “Object 2012 has no method 'split'”. Firefox reports “a[sc] is not >> a function” I have traced the source of the error to the chart.draw() >> call. Again this code had been working fine for months prior and recently >> stopped working. Any help would be appreciated. It is hard to debug with >> such opaque error messages. It seems something changed in the API that >> broke this code. M >> >> Here’s the code: >> google.load("visualization", "1", {packages:["corechart"]}); >> google.setOnLoadCallback(drawChart); >> >> var chosenYears = [2012,2013]; >> var dataArr = /* JSON blob in the form >> [[1,113,"Label",2,352,"Label",…],[1,142,"Label"]…] */; >> >> function drawChart() { >> var data = new google.visualization.DataTable(); >> >> // Build the columns >> data.addColumn('number', 'Week'); >> for (var y = 0; y < chosenYears.length; y++) { >> data.addColumn('number', chosenYears[y]); >> data.addColumn({type:'string', role:'tooltip', 'p': {'html': true}}); >> } >> >> data.addRows(dataArr); >> >> var options = { >> backgroundColor: "transparent", >> interpolateNulls: true, >> tooltip: {isHtml: true}, >> chartArea: { >> width: "90%", >> height:"80%", >> top: 10 >> }, >> hAxis: { >> title: "Week Number", >> }, >> vAxis: { >> title: "Attendance" >> }, >> legend: { >> position: "bottom" >> } >> }; >> var chart = new >> google.visualization.LineChart(document.getElementById("attendance-chart")); >> chart.draw(data, options); >> } >> >> >> -- >> 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]<javascript:> >> . >> To post to this group, send email to >> [email protected]<javascript:> >> . >> Visit this group at >> http://groups.google.com/group/google-visualization-api. >> For more options, visit https://groups.google.com/groups/opt_out. >> > >
-- 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 http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/groups/opt_out.
