Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- colors = d3.scale.category20();
- node.append("rect")
- .attr("height", function(d) { return d.dy; })
- .attr("width", sankey.nodeWidth())
- .style("fill", function(d,i) {
- color_scale = ['#00B0B5', '#EF3F70', '#913D8B', '#FDAF17', '#005796'];
- if(i>7){
- console.log(i-8);
- return color_scale[i-8];
- }
- else{
- return colors(i);
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement