Don't repeat the jsapi script and the google.load call (repeating them does
nothing at all). There should only be one call to
google.setOnLoadCallback, which you can write like this:
google.setOnLoadCallback(function () {
drawVisualizationCH();
drawVisualizationECS();
drawVisualizationAU();
drawVisualizationCLIM();
drawVisualizationEFS();
});
Can you post a link to the page so I can test it?
On Thursday, January 30, 2014 1:03:34 PM UTC-5, Jean-Jacques Biasotto wrote:
>
> Hi asgallant, thanks a lot for your answer, I'm in the fog... :S
>
> YES , i repeat the block :
>
> <script type="text/javascript" src="https://www.google.com/jsapi
> "></script>
> <script type="text/javascript">
> google.load('visualization', '1', {packages: ['corechart']});
> </script>
>
> But NO, i change google.setOnLoadCallback(drawVisualizationCH);
> in google.setOnLoadCallback(drawVisualizationECS);
> google.setOnLoadCallback(drawVisualizationPRS);
> google.setOnLoadCallback(drawVisualizationAU);
> google.setOnLoadCallback(drawVisualizationCLIM);
> google.setOnLoadCallback(drawVisualizationEFS);
>
> in the div id too (CH_div, ECS_div, and so on...
>
>
> Le jeudi 30 janvier 2014 12:07:36 UTC+1, Jean-Jacques Biasotto a écrit :
>>
>> Hello everyone,
>>
>> I created a function which creates a new combo chart in a new repeted
>> area if a value is not null.
>>
>> For each non null value from a data file, i call a text file including
>> Visualisation API code modified with variables, i change variables and load
>> it in an html area in a repeted area.
>>
>> I have no error but my combo charts are not displayed but i can see them
>> with debugger...
>>
>> Any idea ?
>>
>>
>> here is text file : (each "%X" is a variable i modifie when creating
>> combo chart)
>>
>> *<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
>> <http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>">*
>> *<html xmlns="http://www.w3.org/1999/xhtml
>> <http://www.w3.org/1999/xhtml>">*
>> * <head>*
>> * <meta http-equiv="content-type" content="text/html; charset=utf-8"/>*
>> * <title>*
>> * %2*
>> * </title>*
>> * <script type="text/javascript" src="https://www.google.com/jsapi
>> <https://www.google.com/jsapi>"></script>*
>> * <script type="text/javascript">*
>> * google.load('visualization', '1', {packages: ['corechart']});*
>> * </script>*
>> * <script type="text/javascript">*
>> * function drawVisualization%4() {*
>> * // Some raw data (not necessarily accurate)*
>> * var data = google.visualization.arrayToDataTable([*
>> * %1*
>> * ]);*
>>
>> * var options = {*
>> * title : '%2',*
>> * vAxis: {title: "%7"},*
>> * hAxis: {title: "%8"},*
>> * seriesType: "bars",*
>> * series: { %3*
>> * } *
>> * };*
>>
>> * var chart = new
>> google.visualization.ComboChart(document.getElementById('%4_div'));*
>> * chart.draw(data, options);*
>> * }*
>> * google.setOnLoadCallback(drawVisualization%4);*
>> * </script>*
>> * </head>*
>> * <body>*
>> * <div id="%4_div" style="width: %5px; height: %6px;"></div>*
>> * </body>*
>> *</html>*
>>
>>
>> Here is what i get in debugger :
>>
>> *function drawVisualizationCH() { *
>> * // Some raw data (not necessarily accurate) *
>> * var data = google.visualization.arrayToDataTable([ *
>> * ['Mois','Chauffage','économe','normalisé','énergivore'], *
>> *['12-01 2014',410,380,400,580] *
>> * ]); *
>> * var options = { *
>> * title : 'Votre consommation en Chauffage comparée ', *
>> * vAxis: {title: "Kwh"}, *
>> * hAxis: {title: "Chauffage"}, *
>> * seriesType: "bars", *
>> * series: { 0: {color: '#97C802'}, *
>> *1: {type: 'line',color: '#0000FF'}, *
>> *2: {type: 'line',color: '#009F00'}, *
>> *3: {type: 'line',color: '#FF0000'} *
>> * } *
>> * }; *
>> * var chart = new
>> google.visualization.ComboChart(document.getElementById('CH_div')); *
>> * chart.draw(data, options); *
>> * } *
>> * google.setOnLoadCallback(drawVisualizationCH); *
>> *</script>*
>> *<div id="CH_div" style="width: 250px; height: 250px;"></div>*
>>
>> Thanks a lot for your help and your time spent.
>>
>>
--
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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.