mulderp / mulderp.github.com

blog
1 stars 0 forks source link

improve d3 article #11

Open mulderp opened 8 years ago

mulderp commented 8 years ago

explain better how selections work, e.g. http://bost.ocks.org/mike/selection/

selectAll('circle.nodes') can be simpler

show example of replacing e.g. circles with rect

mulderp commented 8 years ago

fix example to:


vis.selectAll("circle .nodes")
   .data(nodes)
   .enter()
   .append("svg:circle")
   .attr('class', 'nodes')
   .attr("cx", function(d) {
mulderp commented 8 years ago

mention http://bost.ocks.org/mike/nest/ and http://bost.ocks.org/mike/join/

mulderp commented 8 years ago

added some more links: fd37b66

mulderp commented 8 years ago

add link to d3 documentation

basic docs:

https://medium.com/@c_behrens/enter-update-exit-6cafc6014c36#.e10u6e8dd

links to enter-remove- pattern

http://stackoverflow.com/questions/22621865/how-to-update-an-svg-path-with-d3-js

http://bl.ocks.org/clemens-tolboom/7231676

mulderp commented 8 years ago

nested groups, an interesting approach: http://codepen.io/philippbosch/pen/lEjzb

mulderp commented 8 years ago

also, appending groups of elements is often helpful: http://stackoverflow.com/questions/13615381/d3-add-text-to-circle

mulderp commented 8 years ago

http://codepen.io/Escu/pen/vLaobV - use of sliders

use of buttons would be nice too.