google chart testing

by toubia95

HTML

<script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">

      // Load the Visualization API and the piechart package.
      google.load('visualization', '1.0', {'packages':['corechart']});

      // Set a callback to run when the Google Visualization API is loaded.
      google.setOnLoadCallback(drawChart);

      // Callback that creates and populates a data table,
      // instantiates the pie chart, passes in the data and
      // draws it.
      function drawChart() {

        // Create the data table.
        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Secteur');
        data.addColumn('number', 'Pourcentage');
        data.addRows([
          ['G\éotechnique et G\énie Civil', 33],
          ['Mati\ères premi\ères \énergetiques et G\éologie num\érique', 21],
          ['Recherche', 20],
          ['Mati\ères premi\ères min\érales', 16],
          ['Eau et environnement', 10]
        ]);

        // Set chart options
        var options = {'title':'Secteurs d\'activités',
                       'width':400,
                       'height':400,
                       'is3D':true,
                       'legend':'bottom',
                       //'colors': ['#3cb2e1', '#49a828', '#f19037', '#e42617', '#954a93', '#464895']
                       };

        // Instantiate and draw our chart, passing in some options.
        var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
        chart.draw(data, options);
      }
    </script>

<div id="chart_div"></div>