The DataView you create for the PieChart has the columns backwards, it 
would be:

Pieview.setColumns([0, 1]);

but you don't actually need a DataView for the PieChart; you can just draw 
the PieChart with the grouped data, since you don't have to change the 
column order or hide any columns: http://jsfiddle.net/asgallant/9zgmnL2s/1/

On Wednesday, October 15, 2014 6:36:24 AM UTC-4, [email protected] wrote:
>
> I changed the aggregation type to number.
>  
> The table now shows but the pie chart is still not showing.
> I get an error:
> +++++
> Foutdetails webpagina
> Gebruikersagent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; 
> Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 
> 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; .NET CLR 1.1.4322; 
> InfoPath.3)
> Tijdstempel: Wed, 15 Oct 2014 10:32:27 UTC
>
> Bericht: Script error
> Regel: 0
> Teken: 0
> Code: 0
> URI: 
> https://www.google.com/uds/api/visualization/1.1/6589f38bf10af801282cca65ca551234/format+nl,default+nl,ui+nl,table+nl,corechart+nl.I.js
> +++++
>  
> Which is the same error as before.
> If I use a debugger I end up in the google charts code with the folloewing 
> error:
> +++++
>   Container is not defined  
> format+nl,default+nl,ui+nl,table+nl,corechart+nl.I.js, regel 131 teken 446
> +++++
>  
> Anyone have an idea how to fix it? (if it is fixable)
>  
> Regards,
>  
> René
>
> Op vrijdag 10 oktober 2014 08:49:46 UTC+2 schreef [email protected]:
>
>>  Thanks, that gave a partial solution. The table now shows but the pie 
>> is not and i get the same error message. I tried every source column 
>> possible.
>>  
>> The tabel shows records from a ticket administration (ticketnumber, 
>> datetime creation, ticket responsible, Title of ticket.
>> In the Pie i would like to show the total number of open tickets per 
>> responsible.
>>
>> Op vrijdag 10 oktober 2014 02:58:14 UTC+2 schreef Andrew Gallant:
>>
>>> Your aggregation column needs to be a number type: 
>>>
>>>  var GroupedData = google.visualization.data.group(Data,[2],[{
>>>     column: 2,
>>>     type: 'number',
>>>     label: Data.getColumnLabel(2),
>>>     aggregation: google.visualization.data.count
>>> }]);
>>>
>>> You may need to change the source column to something other than 2, 
>>> since that is what you are grouping by, but I may be thinking of a 
>>> different use case.
>>>
>>> On Thursday, October 9, 2014 2:52:27 AM UTC-4, [email protected] wrote: 
>>>>
>>>>  Hi,
>>>>  
>>>> I have a table with some data and from that data I would like to count 
>>>> the number of records for column 'Verantwoordelijke'
>>>> The result I would like to show in a pie chart under the table.
>>>> My idea was to group the data on that column and use the count to get 
>>>> those numbers
>>>> If i run the code I get an error:
>>>> +++++++++++++++
>>>> Foutdetails webpagina
>>>> Gebruikersagent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; 
>>>> WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET 
>>>> CLR 
>>>> 3.0.30729; Media Center PC 6.0; .NET4.0C; Bericht: Script error
>>>> Regel: 0
>>>> Teken: 0
>>>> Code: 0
>>>> URI: 
>>>> https://www.google.com/uds/api/visualization/1.0/dee027d0b48a2e0a0a0375d00d7dd635/format+nl,default+nl,ui+nl,corechart+nl.I.js.NET4.0E;
>>>>  
>>>> .NET CLR 1.1.4322; InfoPath.3)
>>>> Tijdstempel: Thu, 9 Oct 2014 06:48:09 UTC
>>>>
>>>> +++++++++++++++
>>>> If I remove the code for the groupeddata the table shows normal.
>>>>  
>>>> I am sure I am overlooking something. I read the documentation but the 
>>>> solution has not dawned yet.
>>>> Does anyone have a suggestion?
>>>> The code I have now is:
>>>>  
>>>>   
>>>>  <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' '
>>>> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'><html xmlns='
>>>> http://www.w3.org/1999/xhtml' xml:lang='nl' lang='nl'>
>>>> <html><head><title>Monitor</title>
>>>> <meta http-equiv="Content-Type"content="text/html; charset=utf-8">
>>>>  
>>>>     <script type='text/javascript' src='https://www.google.com/jsapi
>>>> '></script>
>>>>     <script type='text/javascript'>
>>>>       google.load('visualization', '1', {packages:['corechart']}); 
>>>>       google.setOnLoadCallback(drawStuff);
>>>>
>>>>       function drawStuff() { 
>>>>         var Data = new google.visualization.DataTable(); 
>>>>         Data.addColumn('string', 'Nummer');
>>>>         Data.addColumn('string', 'Datum');
>>>>         Data.addColumn('string', 'Verantwoordelijke');
>>>>         Data.addColumn('string', 'Titel');
>>>>         Data.addRows([
>>>>            ['189646','08-08-2014 12:42:58','Ine Bastings','Record 
>>>> nummer 1'],
>>>>            ['190002','12-08-2014 14:40:07','Ine Bastings','Record 
>>>> nummer 2'],
>>>>            ['191870','01-09-2014 09:02:40','Ine Bastings','Record 
>>>> nummer 3'],
>>>>            ['192327','03-09-2014 13:41:33','Patrick van der 
>>>> Linden','Record nummer 4'],
>>>>            ['193141','12-09-2014 14:40:47','Barbera de Graaf','Record 
>>>> nummer 5'],
>>>>            ['193235','15-09-2014 12:49:44','Barbera de Graaf','Record 
>>>> nummer 6'],
>>>>            ['192333','03-09-2014 14:03:36','Patrick van der 
>>>> Linden','Record nummer 7'],
>>>>            ['192542','05-09-2014 12:57:21','Patrick van der 
>>>> Linden','Record nummer 8'],
>>>>            ['192328','03-09-2014 13:49:00','Patrick van der 
>>>> Linden','Record nummer 9'],
>>>>            ['193243','15-09-2014 13:13:01','Barbera de Graaf','Record 
>>>> nummer 10']
>>>>         ]);
>>>>         var GroupedData = google.visualization.data.group(Data,[2],[{
>>>>             column: 2,
>>>>             type: 'string',
>>>>             label: Data.getColumnLabel(2),
>>>>             aggregation: google.visualization.data.count
>>>>          }]);
>>>>         var Pieview = new google.visualization.DataView(GroupedData);
>>>>         Pieview.setColumns([1,0]);
>>>>
>>>>         var table = new 
>>>> google.visualization.Table(document.getElementById('table_div'));
>>>>         table.draw(Data, {showRowNumber: false,width: '300',allowHtml: 
>>>> true});
>>>>         var Piechart = new 
>>>> google.visualization.PieChart(document.getElementById('pie_div'));
>>>>         Piechart.draw(Pieview);
>>>>       }
>>>>  
>>>>     </script>
>>>> </head>
>>>> <body>
>>>>     <div id='table_div' style='width: 1200px;'></div>
>>>>     <div id='piechart_div' style='width: 1200px; height: 500px;'></div>
>>>>
>>>> <a href=monitor.html>Terug naar hoofdscherm van monitor</a>
>>>> </body></html>
>>>>
>>>>

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