Hmmmm, that's an interesting thought!  I added the console line you 
requested and get the following.  I see that the properties section on the 
right DOES NOT list "_data" which puzzles me:

:



When I drill down on that first line and review the html, I can see the 
dialog data is set to my array and loaded with the data I am trying to 
chart (dialogId = DLG1 so the development tool renames it accordingly):

DLG1_DlgObj._data = [['Type', 'Cost'],['CUSTOMER RETURN', 1405],
['INTER-COMPANY', 100],
['REWORK', 200],
['SCRAP', 100],
['SETUP SCRAP', 110],
['VENDOR RETURN', 5],
['WARRANTY RETURN', 800]];;

Please let me know your thoughts as I am running out of time to get this 
completed.  Boss wants to purchase a charting tool and quite honestly, the 
Google Charts are much prettier and I would prefer we go this route.

Thanks again for all your help!


On Wednesday, November 12, 2014 3:02:48 PM UTC-5, Sergey wrote:

> OK, it looks like your chartdata is undefined. Which is, in fact, not an 
> array. It effectively means that the property _data is missing; which in 
> turn means that something is iffy with your configuration. Please add the 
> line console.log({dialog.object}) and post a screenshot of that, and 
> perhaps I can help you further.
>
> On Wed Nov 12 2014 at 2:57:36 PM <[email protected] <javascript:>> wrote:
>
>>
>> <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] 
>> <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/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