Bonjour,

J'ai un soucis avec ce code mais je ne sais pas où.

Ce code me sert à afficher un tableau avec des lignes.  


<!DOCTYPE html>
<html>
    <head>
        <!--<meta http-equiv="Refresh" content="0.5; url=GrapheV4.php">-->
        <meta charset="utf-8" />
        <link rel="stylesheet" href="style.css" />
        <title>Affichage bdd INERGYS</title>
    </head>

    <body>
        <h1>Affichage Bdd étude V4</h1>
        <form method="post" action="<?php echo "$Nom_fichier";?>">
        <fieldset>
          <legend>Quels paramètres ?</legend> <!-- Titre du fieldset --> 
          
          <p>
            <!-- Début Tableau -->
          <table>
            <tr>
                  <td><label for="serial">Serial</label></td>
                  <td><select name="serial" id="serial">
              <!--<option value="-1">- - - Choisissez un serial - - 
-</option>-->
              <?php
              for($i = 0; $i < $Nb_serial; $i++)
              {
                ?>
                <option
                  <?php if($serial_table[$i] == $valeurserial){echo 
'selected="selected"';} ?> value="<?php echo($serial_table[$i]);?>"><?php 
echo ($serial_table[$i]);?>
                </option> <?php
              } ?>            
            </select></td>      
            </tr>  

            <tr>
                  <td><label for="X">X</label></td>
                  <td><select name="X" id="X">
              <?php
              for($i = 0; $i < $Nb_column; $i++)
              {
                ?>
                <option
                  <?php if($bdd_column_name_data_sigfox[$i] == 
$valeurX){echo 'selected="selected"';} ?> value="<?php 
echo($bdd_column_name_data_sigfox[$i]);?>"><?php echo 
($bdd_column_name_data_sigfox[$i]);?>
                </option> <?php
              } ?>    
            </select></td>
            </tr>

            <tr>
                <td><label for="Y1">Y1</label><br /></td>
                <td><select name="Y1" id="Y1">
              <?php
              for($i = 0; $i < $Nb_column; $i++)
              {
                ?>
                <option
                  <?php if($bdd_column_name_data_sigfox[$i] == 
$valeurY1){echo 'selected="selected"';} ?> value="<?php 
echo($bdd_column_name_data_sigfox[$i]);?>"><?php echo 
($bdd_column_name_data_sigfox[$i]);?>
                </option> <?php
              } ?>
            </select></td>
            </tr>

           

            <tr>
                <td><label for="Nb">Nb de données (10080 
semaine/min)</label></td>
                <td><input type="number" name="Nb" id="Nb" min="1" 
max="20000" value="<?php echo($valeurNb);?>"></td>
            </tr>

            <tr>
                <td><label for="case1">Même Echelle ? </label></td>
                <td><input type="checkbox" name="case1" id="case1" 
                <?php if($valeurcase1==0){echo 'checked="checked"';} 
?>/></td>
            </tr>

            <tr>
                <td><label for="case2">Sans ligne ? </label></td>
                <td><input type="checkbox" name="case2" id="case2" 
                <?php if($valeurcase2==0){echo 'checked="checked"';} 
?>/></td>
            </tr>

          </table>

          
              <input type="submit" value="Envoyer" />
          </p>
        </form>
          <p>
          <script type="text/javascript" 
src="https://www.gstatic.com/charts/loader.js";></script>
          <script type="text/javascript">
            google.charts.load('current', {'packages':['corechart']});
            google.charts.setOnLoadCallback(drawChart);

            function drawChart() 

            {
              var data = google.visualization.arrayToDataTable(<?php echo 
json_encode($test); ?>);

                

              var options = 
              {
                //title: 'Company Performance',
                series: 
                {
                  0: {targetAxisIndex: 0, lineWidth: <?php echo 
($valeurcase2);?>, pointSize: 1},
                  1: {targetAxisIndex: <?php echo ($valeurcase1);?>, 
lineWidth: <?php echo ($valeurcase2);?>, pointSize: 1}
                },
                //curveType: 'none',
                //legend: { position: 'top' }
                vAxes: 
                {
                  // Adds titles to each axis.
                  0: {title: '<?php echo ($test[0][1]);?>'},
                  1: {title: '<?php echo ($test[0][2]);?>'}
                }
                /*crosshair: 
                {
                  color: '#000',
                  trigger: 'selection'
                }*/
              };

              var chart = new 
google.visualization.LineChart(document.getElementById('curve_chart'));

              chart.draw(data, options);
            }
          </script>
          <div id="curve_chart" style="width: 1000px; height: 500px"></div>
          </p>
        </fieldset>
    <footer>
    </footer>
    </body>
</html>


-- 
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/de8f01fc-af8f-4dec-984a-3f66399ef4be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to