title: Show/hide lines/data in Google Chart
body: <p>I'm trying to make a google line chart with 2 lines in it. </p>
  
  <p>You should be able to turn them on and off(show/hide) by two checkboxes.. </p>
  
  <p>Anyone got any idea show to make this, og just give some pointers?</p>
  
  <p>My guess would be some onClick jQuery stuff?</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
        google.load("visualization", "1", {packages:["corechart"]});
        google.setOnLoadCallback(drawChart);
        function drawChart() {
          var data = google.visualization.arrayToDataTable([
            ['Year', 'Sales', 'Expenses'],
            ['2004',  1000,      400],
            ['2005',  1170,      460],
            ['2006',  660,       1120],
            ['2007',  1030,      540]
          ]);
          var options = {
            title: 'Company Performance'
          };
          var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
          chart.draw(data, options);
        }
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="chart_div" style="width: 900px; height: 500px;"&gt;&lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>