Linewidth settings in google line chart - Javascript Google Chart

Javascript examples for Google Chart:Line Chart

Description

Linewidth settings in google line chart

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){//  ww w.  j  a v a 2 s  .c om
google.charts.load('current', {packages: ['corechart', 'line']});
google.charts.setOnLoadCallback(drawBasic);
function drawBasic() {
      var data = new google.visualization.DataTable();
      data.addColumn('number', 'X');
      data.addColumn('number', 'Dogs');
      data.addRows([
        [0, 0], [1, 0], [2, 0],  [3, 17],  [4, 18]
      ]);
      var options = {
        lineWidth: 5,
        hAxis: {
          title: 'Time'
        },
        vAxis: {
          title: 'Popularity',
          minValue: -1
        }
      };
      var chart = new
      google.visualization.LineChart(document.getElementById('chart_div'));
      chart.draw(data, options);
    }
    }

      </script> 
   </head> 
   <body> 
      <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> 
      <div id="chart_div"></div>  
   </body>
</html>

Related Tutorials