Alright so I'm not sure if there's an easier way to do this but this is the issue I'm dealing with right now. I have a datatable in which I want to tally up the unique values in a column. For example in this case I would want to tally up the number of males and females in the column. http://code.google.com/apis/ajax/playground/?type=visualization#full_dashboard
I then want to display a separate pie chart with that data. I think I found a sum function that could add up numbers in a table but I couldn't find one that would tally up the unique values of strings. As such I wrote my own function to loop through and tally up the totals. However I want the pie chart to be binded to the datatable such that when the picker filters out the rows (such as moving the age up), the pie chart would change accordingly as well. Right now the pie chart I generate is based on only the values from the source of the datatable so the chart never changes when I filter out rows with the picker. My idea was instead to call the function every time a picker is selected to recalculate the tallys using the new filtered data table so that the pie chart would be redrawn every time. My question is if there's a way to get retrieve the data from the new table and pass it to my function. Or what would be even easier is to somehow bind two charts that are coming from different sources of data but right now this is the only way I could think of. Thanks! -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/HrY09oo39XUJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
