<https://lh4.googleusercontent.com/-T-EoS3SWMgM/VGO7pTTnmYI/AAAAAAAAAAM/41q4PJVJ87U/s1600/js.jpg>

<https://lh4.googleusercontent.com/-T-EoS3SWMgM/VGO7pTTnmYI/AAAAAAAAAAM/41q4PJVJ87U/s1600/js.jpg>


On Wednesday, November 12, 2014 2:55:44 PM UTC-5, [email protected] wrote:
>
> Thanks for the quick reply Sergey.
>
> Please forgive my ignorance, I'm literally just figuring out how to use 
> the debugging tool today so I really am fumbling through it.  I added the 2 
> lines you mentioned to my javascript function and here's what I see in 
> Firefox debugger.  Unfortunately it doesn't tell me much.  Am I not looking 
> in the right place?:
>
>
>
>
> On Wednesday, November 12, 2014 2:11:21 PM UTC-5, Sergey wrote:
>
>> It's tough to say what's going on here and why it's failing, since it 
>> looks like your data is in fact an array. My guess is that your chartdata 
>> is an array encoded as a string. Could you perhaps do console.log(typeof 
>> chartdata) and report back what it says? Or even 
>> console.log(JSON.stringify(chartdata))?
>>
>> On Wed Nov 12 2014 at 1:58:38 PM <[email protected]> wrote:
>>
>>> Long story short, I use Alpha 5 as my development tool and was able test 
>>> using Google Charts API per some of your examples (and assistance from a 
>>> previous post).  So using your static chart example, I modified my code to 
>>> connect to our SQL database and retrieve data to display in the chart, 
>>> rather than using static, hard coded data.  I can confirm it's connecting 
>>> to our data source and returning the correct data by stepping through my 
>>> code and checking the values of the chart data, but the chart doesn't get 
>>> rendered.   I get a pop up that says:
>>>
>>>
>>>  
>>> When I check the Firefox debugger, it says:
>>> ERROR NOT AN ARRAY
>>> function hga(a,b){var c={};if(!ki(a))throw m("Not an array");
>>>
>>> *Here is my JavaScript function:*
>>>
>>> function drawChart() {
>>>    
>>>   var chartdata = {dialog.object}._data;
>>>   
>>>   var data = google.visualization.arrayToDataTable(
>>>      chartdata
>>>      );
>>>      
>>>   var options = {
>>>     title : 'Cost of Quality',
>>>     is3D: true,
>>>   };
>>>   
>>>   var chart = new 
>>> google.visualization.PieChart(document.getElementById('mychart'));
>>>   
>>>   chart.draw(data, options);
>>> };
>>>
>>>
>>> And the value of {dialog.object}._data = [['Type', 'Cost'],['CUSTOMER 
>>> RETURN', 1405],¶['INTER-COMPANY', 100],¶['REWORK', 200],¶['SCRAP', 
>>> 100],¶['SETUP SCRAP', 110],¶['VENDOR RETURN', 5],¶['WARRANTY RETURN', 800]];
>>>
>>> Can anyone shed some light on this error?  I'm at a loss.  Thanks.
>>>
>>>
>>>  -- 
>>> 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.
>>>
>>

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