title: Setting variable limits for cytoscape.js mapData
body: <p>Quick question. I am trying to use cytoscape's.js mapData linear mapper to set the colour of edges in a small plot.
  There is, however, a small problem. The following example works without a hitch.</p>
  
  <pre><code>.selector('edge')
      .css({
         'line-color': 'mapData(similarity,1.8,3.78, blue, red)'
         'width': 2,
         'opacity': 0.8
    })
  </code></pre>
  
  <p>However, as soon as a I replace the fixed boundaries, I am in a bit of a pickle.</p>
  
  <pre><code>.selector('edge')
      .css({
          'line-color': 'mapData(similarity,min, max, blue, red)',
          'width': 2,
          'opacity': 0.8
   })
  </code></pre>
  
  <p>the coloured edges disappear, and all turn grey. The min and max variables are set prior, and I can verify this because they are being used to calculate other stuff before the graph is created. I have looked through the documentation but cannot find anything regarding this issue.</p>
  
  <p>As @dandavis suggested, It might be a plugin thing. So I tried adding the to add the max and min to each edge json definition. This was done thinking that maybe the mapData function assumes that whenever a "variable" is used, they are stored in the definition of the appropriate selector.</p>
  
  <pre><code>id: "133700_307800"
  max_sim: 3.57829530512
  min_sim: 1.9655114484
  similarity: 3.57829530512
  source: "133700"
  target: "307800"
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>thanks a lot!</p>