Ok, first, the reason you get that error is because on this line in your 
"for" loop:

var date = new Date(parseInt(dt.getValue(row, 3)));

"dt" does not exist.  It is valid to use "dt" inside the "calc" functions 
in the chart view, because you have a function parameter being passed in 
with that name.  You want to use the line you commented out above this one:

var date = new Date(parseInt(dataValues[i].Date.substr(6), 10));

You also have an issue in the view, as this line will cause you problems 
(your axis values will show up as "NaN NaN NaN"):

var date = new Date(parseInt(dt.getValue(row, 3)));

Here, dt.getValue(row, 3) returns a Date object.  You do not want to parse 
the Date object as an integer to create a new Date object with.  Just use 
the returned Date directly:

var date = dt.getValue(row, 3);

I create a jsfiddle with these fixes for you so you can see it working: 
http://jsfiddle.net/asgallant/rGv9P/.  You can copy the 
drawVisualizationfunction directly from the fiddle and overwrite the one in 
your code.

On Wednesday, May 14, 2014 8:46:32 AM UTC-4, Missy wrote:
>
> apology for the late response.  I updated my code a little bit, however 
> now it keep throwing reference errors on (dt) and (row) variables.  
>
> *reference error --> ReferenceError: dt is not defined *
>
>             for (var i = 0; i < dataValues.length; i++) {
>
>                // var date = new 
> Date(parseInt(dataValues[i].Date.substr(6), 10));
>                 var date = new Date(parseInt(dt.getValue(row, 3)));
>
>               // var date = new Date(parseInt(dataValues[i].getValue(row, 
> 3)));
>
>                 data.addRow([dataValues[i].ColumnName, 
> dataValues[i].Value, dataValues[i].Type, dataValues[i].Date]);
>             }
>
> There is already a pasreInt code in the view property of the line chart. 
>  Would i need to call the same function above, again. 
>
> I am also submitting my datavalues as further reference:
>
> <script 
> type="text/javascript">google.load('visualization','1.0',{'packages':['corechart','controls']});google.setOnLoadCallback(function(){drawVisualization([{"ColumnName":"ABERD","Value":97,"Type":"TALK","Date":"\/Date(1399935600000)\/"},{"ColumnName":"ABERD","Value":97,"Type":"TALK","Date":"\/Date(1399935600000)\/"},{"ColumnName":"ABFC","Value":62,"Type":"CVR","Date":"\/Date(1399935600000)\/"},{"ColumnName":"AHMA","Value":67,"Type":"CVR","Date":"\/Date(1399935600000)\/"},{"ColumnName":"ALCMY","Value":88,"Type":"TALK","Date":"\/Date(1399935600000)\/"}],'Text
>  
> Example','Text Example','Text Example');});</script
>
> Please advice, in where I may be going wrong, if possible. Thank you. 
>

-- 
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