title: How to hide lines of Google line chart?
body: <p>I'm using Google line chart in my project which displays different lines according to data. I want to show/hide lines when clicking their legend. </p>
  
  <pre><code>    function drawSalesGraph()
  {
      if (sales_data_graph.length &gt; 1)
      {
          graph_height = 500;
          var options_graph = {
              width: '1200',
              height:graph_height,
              colors: ['#ea6f09','#fb250d', '#0ac9c6', '#2680be', '#575bee','#6bd962','#ff0000','#000000'],
              fontSize : 10,
              pointSize : 10,
              legend: {'position': 'right'}
          };
          var data = new google.visualization.arrayToDataTable(sales_data_graph);
          $('#graph_sales_data').show();
      }
      else
      {
          var data = new google.visualization.DataTable();
          $('#graph_sales_data').hide();
      }
      // Create and draw the visualization.
      chart = new google.visualization.AreaChart(document.getElementById('graph_sales_data'));
      chart.draw(data, options_graph);
  }
  </code></pre>