title: Hiding lines google chart by click legend , legend is not grey and troubles when all the lines are hiding
body: <p>A time ago i asked here how i can hide lines in a google chart when clicking on the legend. now i have found a solution how i can do this and you can see working it on <a href="https://jsfiddle.net/gptke2wL/" rel="nofollow noreferrer">JSFIDDLE</a> but there some little things that doesn't work for example:</p>
  
  <ul>
  <li>When i click on the legend the line were i clicked on is hide so that's good but the sample in the legend is not grey and i don't understand why because it have to be grey</li>
  <li>When i hide all the lines and i want to show the lines again , they only are showing at the chartrangefilter like you can see in the <a href="https://jsfiddle.net/gptke2wL/" rel="nofollow noreferrer">JSFIDDLE</a> example so i want that is not possible to hide al the lines that there is for minimum showing one line and otherwise give a warning in a popup box when someone try to hide the last line.</li>
  </ul>
  
  <p>Can someone helps me?</p>
  
  <p>This is the code that i use to hide te line by clicking</p>
  
  <pre><code>google.visualization.events.addListener(chart, 'select', function () {
  var sel = chart.getSelection();
  // if selection length is 0, we deselected an element
  if (sel.length &gt; 0) {
              // if row is undefined, we clicked on the legend
              if (sel[0].row === null) {
                  var col = sel[0].column;
                  if (columns[col] == col) {
                      // hide the data series
                      columns[col] = {
                          label: data.getColumnLabel(col),
                          type: data.getColumnType(col),
                          calc: function () {
                              return null;
                          }
                      };
  
                      // grey out the legend entry
                      series[col - 1].color = '#CCCCCC';
                  }
                  else {
                      // show the data series
                      columns[col] = col;
                      series[col - 1].color = null;
                  }
                  var view = new google.visualization.DataView(data);
                  view.setColumns(columns);
                  chart.draw(view, options);
              }
          }
      });
  </code></pre>