title: dygraph change line color
body: <p>I want to change line color off a dygraph chart
  with value.<br>
  Example when my data is greater than 2, I want to change the color.</p>
  
  <p>I try option color, but is change just the point color.</p>
  
  <p>I make a <a href="https://jsfiddle.net/gjdzpesL/" rel="nofollow noreferrer">JsFiddle here</a>. </p>
  
  <p>This is my option dygraph:</p>
  
  <pre><code>color: function (color, d) {
      if (typeof d.index === 'undefined') { return color; }
  
      var val = columns[0][d.index + 1];
  
      if (val &gt;= 0 &amp;&amp; val &lt;= 150) {
          color = 'green';
      } else if (val &gt; 150 &amp;&amp; val &lt;= 300) {
          color = 'yellow';
      } else if (val &gt; 300) {
          color = 'red';
      }
  
      return color;
  }
  </code></pre>