Timothy,

You need an element in your page with id="'slices_of_pie" to serve as the
container of the pie chart.  The error message sounds like it is saying
this element is missing.

dan


On Mon, May 13, 2013 at 3:21 AM, Timothy Makobu <[email protected]
> wrote:

> Hello all,
>
> I'm getting started with GCT. The pie chart on the quickstart wont render
> though. Below is the error:
>
> Timestamp: 5/13/2013 10:16:15 AM
> Error: Error: Container is not defined
> Source File:
> https://www.google.com/uds/api/visualization/1.0/0fb98c40e9e7bc594107c5bf2cc32e1e/format+en_GB,default,corechart.I.js
> Line: 850
>
> And here's my code:
>     <script type="text/javascript">
>     google.load('visualization', '1.0', {'packages':['corechart']});
>
>     function drawChart(){
>     var data = new google.visualization.DataTable();
>     data.addColumn('string', 'Topping');
>     data.addColumn('number', 'Slices');
>     data.addRows([
>     ['Mushrooms', 3],
>     ['Onions', 1],
>     ['Olives', 1],
>     ['Zucchini', 1],
>     ['Pepperoni', 2]
>     ]);
>
>     var options = {
>     'title':'How much pizza I ate last night',
>     'width':400,
>     'height':300,
>     }
>
>     var chart = new
> google.visualization.PieChart(document.getElementById('slices_of_pie'));
>     chart.draw(data, options);
>     }
>     google.setOnLoadCallback(drawChart);
>
>
>     </script>
>
> What I'm I doing wrong?
>
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>  -
978-394-1058
[email protected] <[email protected]>   562D 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to