Guest User

Untitled

a guest
Nov 18th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. var dropShadowFilter = this.d3Graph.append('svg:filter')
  2. .attr('id', 'drop-shadow')
  3. .attr('filterUnits', "userSpaceOnUse")
  4. .attr('width', '250%')
  5. .attr('height', '250%');
  6. dropShadowFilter.append('svg:feGaussianBlur')
  7. .attr('in', 'SourceGraphic')
  8. .attr('stdDeviation', 2)
  9. .attr('result', 'blur-out');
  10. dropShadowFilter.append('svg:feColorMatrix')
  11. .attr('in', 'blur-out')
  12. .attr('type', 'hueRotate')
  13. .attr('values', 180)
  14. .attr('result', 'color-out');
  15. dropShadowFilter.append('svg:feOffset')
  16. .attr('in', 'color-out')
  17. .attr('dx', 3)
  18. .attr('dy', 3)
  19. .attr('result', 'the-shadow');
  20. dropShadowFilter.append('svg:feBlend')
  21. .attr('in', 'SourceGraphic')
  22. .attr('in2', 'the-shadow')
  23. .attr('mode', 'normal');
  24.  
  25.  
  26. this.node = this.d3Graph.selectAll(null)
  27. .data(Nodes)
  28. .enter()
  29. .append("g")
  30. .attr("class", "nodes");
  31.  
  32. this.node.append("circle")
  33. .attr("r", 30)
  34. .attr("fill", "red")
  35. .style("filter", "url(#drop-shadow)")
Add Comment
Please, Sign In to add comment