Guest User

Untitled

a guest
Feb 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. =======HOW TO DEFINE AND APPEND THE SVG
  2. //Create the SVG Viewport selection
  3. var svgContainer = d3.select("body").append("svg")
  4. .attr("width", 400)
  5. .attr("height", 100);
  6.  
  7. =======HOW TO DEFINE AND APPEND A SHAPE
  8.  
  9.  
  10. =======HOW TO GRAB DATA
  11.  
  12.  
  13. =======HOW TO ESTABLISH A SCALE
  14. //Create the Scale we will use for the Axis
  15. var axisScale = d3.scale.linear()
  16. .domain([0,100])
  17. .range([0,100]);
  18.  
  19. //Create the Scale we will use for the Axis
  20. var xAxis = d3.svg.axis()
  21. .scale(axisScale);
  22.  
  23. //Create the Axis
  24. var xAxis = d3.svg.axis()
  25. .scale(axisScale);
  26.  
  27. //Create a group Element for the Axis elements and call the xAxis function
  28. var xAxisGroup = svgContainer.append("g")
  29. .call(xAxis);
  30.  
  31. =======
Add Comment
Please, Sign In to add comment