Thank you Daniel, I'm goin to try to adapt it for Table Chart El lunes, 24 de marzo de 2014 16:51:22 UTC+1, Daniel LaLiberte escribió: > > Maybe what you are trying to do is demonstrated by this PieFilter: > http://jsfiddle.net/6NeKr/ > Only, instead of the second PieChart, use your Table chart. > > > > On Mon, Mar 24, 2014 at 11:00 AM, Delpi <[email protected] > <javascript:>>wrote: > >> Hi, >> I'm a new google chart's user and I need help. >> I have a chart and a table and need that when I select a pie in the >> chart, this value filter what table shows. >> I have this code: >> >> <html> >> <head> >> <script type="text/javascript" src="https://www.google.com/jsapi >> "></script> >> <script type="text/javascript"> >> >> google.load("visualization", "1", {packages:["corechart"]}); >> google.setOnLoadCallback(drawChart); >> function drawChart() { >> var data = google.visualization.arrayToDataTable([ >> ['Categorias', 'Cantidad'], >> ['Hombres', 3], >> ['Mujeres', 2], >> ['Niños', 1] >> ]); >> >> var options = { >> title: 'Categorias' >> }; >> >> var chart = new >> google.visualization.PieChart(document.getElementById('piechart')); >> chart.draw(data, options); >> } >> >> google.load('visualization', '1', {packages:['table']}); >> google.setOnLoadCallback(drawTable); >> function drawTable() { >> var data = new google.visualization.DataTable(); >> data.addColumn('string', 'Nombre'); >> data.addColumn('number', 'Edad'); >> data.addColumn('string', 'Categorias'); >> data.addRows([ >> ['José Luis', 43, 'Hombres'], >> ['Raquel', 36, 'Mujeres'], >> ['Diana', 3, 'Niños'], >> ['Diego', 98, 'Hombres'], >> ['Consuelo', 69, 'Mujeres'], >> ['Javier', 40, 'Hombres'] >> ]); >> >> var table = new >> google.visualization.Table(document.getElementById('table_div')); >> table.draw(data, {showRowNumber: true}); >> } >> >> </script> >> </head> >> <body> >> <div id="piechart" style="width: 900px; height: 500px;"></div> >> <div id='table_div'></div> >> </body> >> </html> >> >> May anybody help me? >> 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]<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. >> > > > > -- > Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> > - 978-394-1058 > [email protected] <javascript:> 5CC, Cambridge MA > [email protected] <javascript:> 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. For more options, visit https://groups.google.com/d/optout.
