Hi everybody,

I'm trying to display 6 charts, 3 charts should be displayed using line 
charts and 3 otherones using tables. Both groups have the same data.

The point is that I can't charge both libraries at same time.

Table charts uses:    
 google.charts.load('current', {'packages': ['table']});


Line charts uses: 
google.charts.load('current', {'packages': ['corechart']});


The issue comes when I'm trying to get both, seems like once one is charged 
in the page the other one can't be charged. I tried in some methods like:

 google.charts.load('current', {'packages': ['table']});

google.charts.load('current', {'packages': ['corechart']});

OR

google.charts.load('current', {'packages': ['corechart']}, {'packages': [
'table']});



How that does not look to work I just tryied to use jQuery to display one 
type or other one depending of a selection on a radio button like this:

            
$(document).ready(function () {
                $('#option-2').change(function () {
                    if ($(this).is(':checked')) {
                        alert("Table");
                        
                        google.charts.load('current', {'packages': ['table'
]});


                        google.charts.setOnLoadCallback(TableTemps);
                        google.charts.setOnLoadCallback(TableWatts);
                        google.charts.setOnLoadCallback(TableAmps);
                       
                    }
                });
                $('#option-1').change(function () {
                    if ($(this).is(':checked')) {
                        alert("line");
                        
                        google.charts.load('current', {'packages': [
'corechart']}, {'packages': ['table']});


                        google.charts.setOnLoadCallback(Temps);
                        google.charts.setOnLoadCallback(Watts);
                        google.charts.setOnLoadCallback(Amps);
                        
                    }
                });
            });

But as I said, once one of the libraries is charged the other one can't be 
charged so neither used.

Does anyone know how could I display both types of charts at the same time 
or at least use the second solution I did to just select a kind of chart?

Appreciate your help.

Javier Vendrell

-- 
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/6cd48650-c174-40e0-9ab5-873cfbc5441b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to