Advertisement
Guest User

Untitled

a guest
Apr 26th, 2016
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. colors = d3.scale.category20();
  2. node.append("rect")
  3. .attr("height", function(d) { return d.dy; })
  4. .attr("width", sankey.nodeWidth())
  5. .style("fill", function(d,i) {
  6. color_scale = ['#00B0B5', '#EF3F70', '#913D8B', '#FDAF17', '#005796'];
  7. if(i>7){
  8. console.log(i-8);
  9. return color_scale[i-8];
  10. }
  11. else{
  12. return colors(i);
  13. }
  14. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement