statistic chart google char php

0

Good I'm doing statistical graph with chart php and google chart.

The graph goes well but now I want the values that only come out when I pass the mouse is shown. Now I want the values to be noticed without passing the mouse.

I'm doing it with php and sql server and what graphic grabs it from the database.

This is what has been done.

 <script type="text/javascript">
     //google.charts.load('current', {'packages':['bar']});
     google.charts.load('current', {'packages':['corechart']});
      google.charts.setOnLoadCallback(drawChart);

      function drawChart() {
           var data = new google.visualization.arrayToDataTable(<?php echo $jsonData ?>);

        var options = {
          chart: {
            title: 'Detalle Gráfico'

           // subtitle: 'Sales, Expenses, and Profit: 2014-2017',
          },
          bars: 'vertical', // Required for Material Bar Charts.
          vAxis: {format: 'decimal'},
          height: 400,
          colors: ['#1b9e77', '#d95f02', '#7570b3'],
          chart

        };

        var chart = new google.charts.Bar(document.getElementById('dual_x_div'));

        chart.draw(data, google.charts.Bar.convertOptions(options));

        var btns = document.getElementById('btn-group');

        btns.onclick = function (e) {

          if (e.target.tagName === 'BUTTON') {
            options.vAxis.format = e.target.id === 'none' ? '' : e.target.id;
            chart.draw(data, google.charts.Bar.convertOptions(options));
          }
        }
      }
    </script>


  <div id="dual_x_div" style="width: 900px; height: 500px;text-align: center;"></div>

So I would like it to be shown

    
asked by PieroDev 19.07.2018 в 19:13
source

0 answers