Try this:
<?php
$sxml = simplexml_load_file('graph.xml');
$sxml2 = simplexml_load_file('graphier.xml');
var_dump($sxml);
var_dump($sxml2);
?>
On Wednesday, October 24, 2012 5:09:07 AM UTC-4, thecatz wrote:
>
> Finally i realy don't understand what i ve to do :) sorry !
>
> where i've to put this :
>
> var_dump($sxml->Row);
> var_dump($sxml2->Row);
>
> thx for your help !
>
> <html>
> <head>
> <script type="text/javascript" src="https://www.google.com/jsapi
> "></script>
> <script type="text/javascript">
> google.load('visualization', '1', {packages: ['corechart']});
> google.setOnLoadCallback(drawChart);
>
> function drawChart () {
> var data = new google.visualization.DataTable();
> data.addColumn('string', 'heures');
> data.addColumn('number', 'today');
> data.addColumn('number2', 'yesterday');
>
> <?php
> $sxml = simplexml_load_file('graph.xml');
> $sxml2 = simplexml_load_file('graphier.xml');
> foreach ($sxml->Row as $hey=>$row){
> echo "data.addRow([ '{$row[Dim1]}', {$row[Metric1]} ,
> {$sxml2->Row[$hey][Metric1]}]);";
> }
> ?>
>
> var options = {
> title: 'test',
> hAxis: {title: 'heures', titleTextStyle: {color: 'red'}}
> };
>
> }
> </script>
>
>
> </head>
> <body>
> <div id="chart_div" style="width: 900px; height: 500px;"></div>
> </body>
> </html>
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/K3zHdBZgd14J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.