Camden,

That kind of error message means we are not catching data errors that
should be reported in more intelligible ways.  Thanks for posting, so we
can make amends.  Glad you found a solution.

On Tue, Jun 30, 2015 at 9:26 PM, Camden Narzt <
[email protected]> wrote:

> nevermind, the date I was passing in wasn't parseable by js
>
>
> On Tuesday, June 30, 2015 at 5:02:35 PM UTC-6, Camden Narzt wrote:
>
>> I'm getting this error when trying to draw a linechart and am not sure
>> how to debug this, adivce would be appreciated.
>>
>> The js is:
>>
>> function addDays(date, days) {
>>   var result = new Date(date);
>>   result.setDate(date.getDate() + days);
>>   return result;
>> }
>>
>> function colorLinesFactory(elem){
>>   return function(){elem.children('svg > g rect+g g rect[fill="#cccccc"]'
>> ).each(function(i,el){
>>     el.style.fill = "url("+document.location+"#svg_cam)";
>>   });
>>   }
>> }
>>
>> function drawVisualization(elem) {
>>   var data = new google.visualization.DataTable();
>>   data.addColumn('number', 'Result');
>>   data.addColumn('date', 'Date');
>>   data.addColumn({type:'date', role:'annotation'});
>>   data.addColumn({type:'boolean', role:'emphasis'});
>>   data.addColumn({type:'boolean', role:'scope'});
>>
>>   var data0 = new google.visualization.DataTable();
>>   data0.addColumn('number', 'Result');
>>   data0.addColumn('date', 'Date');
>>   data0.addColumn({type:'boolean', role:'emphasis'});
>>   data0.addColumn({type:'boolean', role:'scope'});
>>
>>   var e = $(elem)
>>   var date = new Date(e.data().date);
>>
>>   data.addRow([ e.data().value, date, date, true, true]);
>>   data0.addRow([ 0, date, false,false]);
>>
>>   var chart = new google.visualization.LineChart(elem);
>>   var options = {
>>     animation:{duration:2000,easing:'inAndOut'},
>>     backgroundColor:"transparent",
>>     enableInteractivity:true,
>>     chartArea:{top:7,width:'95%',height:'85%'},
>>     width:450,
>>     height:250,
>>     pointSize:4,
>>     reverseCategories:true,
>>     legend:{position:'none'},
>>     annotations:{textStyle:{auraColor:'#fff'}},
>>     vAxis: {
>>       gridlines:{count:1},
>>       minorGridlines:{count:0},
>>       baseline: addDays(date,-1),
>>       maxValue: addDays(date,1),
>>       baselineColor:'black',
>>       ticks: [date],
>>       textPosition:'none'
>>     },
>>     series:{0:{targetAxisIndex:1}},
>>     hAxis: {
>>       baselineColor:'transparent',
>>       textPosition:'none',
>>       maxValue: 2,
>>       minValue:-2,
>>       gridlines:{color:'transparent'}
>>     }
>>   };
>>
>>   var colorLines = colorLinesFactory(e);
>>
>>   var first = true;
>>   google.visualization.events.addListener(chart, 'ready',function(){
>>     colorLines();
>>     setTimeout(function(){
>>       if(first){
>>         first=false;
>>         chart.draw(data, options);
>>       }
>>     }, 1000);
>>   });
>>
>>   google.visualization.events.addListener(chart, 'animationfinish',
>> colorLines);
>>   google.visualization.events.addListener(chart, 'animationframefinish',
>> colorLines);
>>
>>   chart.draw(data0, options);
>>
>> }
>>
>> $(function(){
>>   if($('[data-graph]').length){
>>     $.getScript('//www.google.com/jsapi', function() {
>>         google.load('visualization', '1', {packages: ['corechart'],
>> "callback":function(){
>>           $('[data-graph]').each(function(
>> ...
>
>  --
> 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/d/optout.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>  -
978-394-1058
[email protected] <[email protected]>   5CC, Cambridge MA
[email protected] <[email protected]> 9 Juniper Ridge
Road, Acton 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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to