Hi Javi,
Do it like this instead:
google.charts.load('current', {'packages': ['corechart', 'table']});
On Tue, May 24, 2016 at 11:29 AM, Javi Vendrell <[email protected]>
wrote:
> Okay, I just saw something in Google charts documentation (pretty hidden
> by the way) that says you can't use google.charts.load() more than once,
> but there also says that you can list all the packages you'll need in one
> call as you can see is the second thing I tried on my post up, but still
> not working.
>
> *Documentation says: *
>
> There are three minor but important limitations with loading Google Charts
>> that we expect to resolve in the near future:
>>
>> 1. You can only call google.charts.load() *once*. But you can list
>> all the packages that you'll need in one call, so there's no need to make
>> separate calls.
>>
>>
>> 1. You can't autoload the library.
>>
>>
>> 1. If you're using a ChartWrapper, you must explicitly load all the
>> packages you'll need, rather than relying on the ChartWrapper to
>> automatically load them for you.
>>
>>
>> 1. For Geochart
>> <https://developers.google.com/chart/interactive/docs/gallery/geochart>
>> and Map Chart
>> <https://developers.google.com/chart/interactive/docs/gallery/map>,
>> you must load both the old library loader and the new library loader.
>>
>>
> 2016-05-24 17:03 GMT+02:00 Javi Vendrell <[email protected]>:
>
>> 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 a topic in the
>> Google Groups "Google Visualization API" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/google-visualization-api/9BfnY-emyA0/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, 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
>> <https://groups.google.com/d/msgid/google-visualization-api/6cd48650-c174-40e0-9ab5-873cfbc5441b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Javier Vendrell Møller
>
> --
> 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/CAFEEN0bhe6LAqNE6zM4nLdfnSYcDDmeckaGW78ao%3DESerNR4KQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/google-visualization-api/CAFEEN0bhe6LAqNE6zM4nLdfnSYcDDmeckaGW78ao%3DESerNR4KQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
[email protected] <[email protected]> 5CC, Cambridge 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 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/CAOtcSJMtOLDSf8R18OsvO0tT9DhXmdvPWuws_VVBcXzHJMj9Vw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.