title: Setting dygraphs initial column visibility by series name
body: <p>I'm trying to set the initial visiblity of some dygraphs data series by column name.</p>
  
  <p>This is because the data comes from a CSV file with columns that may come or go, but I know that a couple of the columns I want to be disabled by default - but I don't know what column number they may be (just the name).</p>
  
  <p>I'm new to javascript, so the answer is likely simple.
  I'm trying to do this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      g = new Dygraph(
          document.getElementById("graphdiv"),  // containing div
          "last/test.csv",
          {
              connectSeparatedPoints: true,
              includeZero: true
          }
      );
  
      g.setVisibility(g.indexFromSetName("writer_write_start") - 1, 0);
  &lt;/script&gt;
  </code></pre>
  
  <p>But this gives me an error. If I run the setVisibility command from the javascript console or an onclick event, it works fine. I suspect it's something to do with the Dygraph not being fully loaded by the time I try to run methods referring to data in the CSV file, and I need to run this in some other way after the dygraph has fully loaded.</p>