Below is what I did using JQuery.

        google.visualization.events.addListener(chart, 'select', 
selectHandler);

        function selectHandler() {
            var selectedItem = chart.getSelection()[0];
            if (selectedItem) {
                var value1 = data.getValue(selectedItem.row, 4);
                var value2 = data.getValue(selectedItem.row, 5);
                $("#div1").load("chart1.asp?str1=" + value1 + "&str2=" + 
value2);    
                $("#div2").load("chart2.asp?str1=" + value1 + "&str2=" + 
value2);    
            }
        }

On Tuesday, October 23, 2018 at 11:49:29 AM UTC-5, JosePlaza wrote:
>
> I want to know how to display a new chart after clicking on data of 
> another chart.
>
> For example: 
>
> If I have a barchart display the amount of food Jose - Maria - Adam ate, I 
> want to be able to click on Jose's name and have a new chart displaying the 
> types of food that he ate. Same thing for Maria and Adam.
> ------------------------------------------------------
> Demo:
> ------------------------------------------------------
> Bar Chart - Who ate the most?
>       
>    0          
>    0          0            
>    0          0             0
>    0          0             0
> Jose     Maria     Adam
> ------------------------------------------------------
> >>>>> Click on Jose
> ------------------------------------------------------
> Bar Chart - What did he eat?
>
>             0                                      0
>             0                    0                0
>             0                    0                0
> Slices of Pizza     HotDogs     Wings
> ------------------------------------------------------
>
> Anyone has an idea on how to do this?
>
> Thanks for your help.
>

-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/b8c3fe9b-7591-455b-a9ef-8c80d2fb726a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to