php - How to populate a Google Chart from an HTML table? -


i have question, possible populate google chart html table?

i have initialized google chart in wordpress this:

<script type="text/javascript">   google.load("visualization", "1", {packages:["corechart"]});   google.setonloadcallback(drawchart);   function drawchart() {     var data = google.visualization.arraytodatatable([       ['language', 'speakers (in millions)'],       ['german',  5.85],       ['french',  1.66],       ['italian', 0.316],       ['romansh', 0.0791]     ]);    var options = {     legend: 'none',     pieslicetext: 'label',     title: 'swiss language use (100 degree rotation)',     piestartangle: 100,   };      var chart = new google.visualization.piechart(document.getelementbyid('piechart'));     chart.draw(data, options);   } </script> 

table filled dynamically unfortunately

  <table id="example" class="display" cellspacing="0" width="100%">    <thead>    <tr>    <th>name</th>    <th>kg</th>    </tr>    </thead>    <tbody>    <tr>    <td>[85-dynamic value]</td>    <td>[86-dynamic value]</td>    </tr>    </tbody>    </table>` 

thanks help


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -