Ok, didn't said anything, can't believe how stupid I'm sometimes.... That 
hapends when you are programming 12h a day... but the problem that I was 
doing and that I was missing is as simple how I was charging unexisting 
typecharts

instead using 'corechart' I was trying to load 'line' so the solution is as 
simple as writting:

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

instead;


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




El dimarts, 24 maig de 2016 17:03:47 UTC+2, Javi Vendrell va escriure:
>
> 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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
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/fd2da2a8-5875-481e-9a85-fa110e472242%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to