Hi crazynet,

It is difficult to understand how your php code will result in the html and
script code, so could you post a link to a web page that demonstrates your
problem?  Or view the source of the page in your browser, and copy that
here.  Perhaps if you look at the generated html and script code, your
problem will become clear to you.

2015-02-20 4:17 GMT-05:00 <[email protected]>:

> Hallo,
> ich habe das Problem, das ich bei Curving the Lines Daten aus zwei
> Tabellen einer DB hinzufügen muss.
>
> Habe es jetzt mit var dataA und var dataB probiert und versucht mit
> chart.draw(dataA, dataB, options); auf zu rufen. Es wird mir leider nur
> dataA angezeigt.
>
> Kann mir jemand helfen? Ich füge den Code unten bei:
>
>
> <?
> include("overview.inc");
> ?>
> <script type="text/javascript" src="
> https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1','packages':['corechart']}]}"></script
> >
> <script type="text/javascript">
>  google.setOnLoadCallback(drawChart);
>     function drawChart() {
>   var dataA = google.visualization.arrayToDataTable([
>    ['Zeit', 'Wert heute'],
>    <?php
>     include("overview.inc");
>
>     $result=mysql_query("SELECT Zeit,Wert FROM statuszehn ORDER BY SZID;");
>
>     $i=0;
>     while( $row=mysql_fetch_array($result) )
>     {
>      echo "['".$row['Zeit']."',".$row['Wert']."],";
>      $i++;
>     }
>    ?>
>         ]);
>
>   var dataB = google.visualization.arrayToDataTable([
>    ['Zeit', 'Wert gestern'],
>    <?php
>     $result=mysql_query("SELECT Zeit, Wert FROM statuszehngestern ORDER BY
> SZGID;");
>
>     $j=0;
>     while( $row=mysql_fetch_array($result) )
>     {
>      echo "['".$row['Zeit']."',".$row['Wert']."],";
>      $j++;
>     }
>    ?>
>         ]);
>
>         var options = {
>    title: 'Status 10',
>    curveType: 'function',
>    legend: { position: 'bottom' }
>         };
>         var chart = new
> google.visualization.LineChart(document.getElementById('curve_chart'));
>         chart.draw(dataA, dataB, options);
>     }
>  </script>
> <div id="curve_chart" style="width: 900px; height: 500px"></div>
>
>  --
> 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/d/optout.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>  -
978-394-1058
[email protected] <[email protected]>   5CC, Cambridge MA
[email protected] <[email protected]> 9 Juniper Ridge
Road, Acton 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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to