Problem in generating bar graph from google chart from database extracted values?
Entering edit mode
3.8 years ago
Vinay Singh ▴ 50

My database table (test_12) is as follows: S.I A B C X Y
SBI234 2.280130800000 2.339592225000 2.237112614000 2.296371308000 2.295634019000
SBI316 1.832411563000 1.825578753000 1.830375097000 1.826226610000 1.831125007000
SBI425 1.922666139000 1.937724567000 1.913369116000 1.941975395000 1.937476796000
SBI567 1.926532891000 1.956353519000 1.978980200000 1.982052669000 2.001432287000

My Code used to draw bar graph (Google chart) is as follows:

    <html>   <head>
    <script type="text/javascript" src="&lt;a href=" https:="""" charts="" loader.js"="" rel="nofollow">"></script>
    <script type="text/javascript">
      google.charts.load('current', {'packages':['bar']});

      function drawChart() {
        var data = google.visualization.arrayToDataTable([

     var options = {
          chart: {
            title: 'Google_Chart_Test',
            subtitle: 'Bar graph test',
           var chart = new google.charts.Bar(document.getElementById('columnchart_material'));

        chart.draw(data, google.charts.Bar.convertOptions(options));
    </script>   </head>   <body>
</body> </html>

The Result i am getting is attached kindly help me to solve the problem. Database connection is showing, graph shows null values on all axis.enter image description here

PhP Google chart mysql database • 945 views

Login before adding your answer.

Traffic: 1860 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6