Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. svgElement.selectAll(".positiveBar")
  2. .data(function(d){ return d; })
  3. .enter()
  4. .append("rect")
  5. .attr("x", function(d, i, j){
  6. return x(d.time) + x.bandwidth() / n *j;
  7. })
  8. .attr("width", x.bandwidth() / n)
  9. .attr("y", function(d) { return y(d.y); })
  10. .attr("height", function(d){ return y(0)- y(d.y); })
  11. .attr("class","positiveBar")
  12. .attr("fill",function(d, i, j) {
  13. return colors ? colors[j] : '#111';
  14. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement