DSContEd / IntroWebDevelopment

At the end of the course, students will be able to plan, design, and implement a web site using current standards and best practices.
1 stars 1 forks source link

What is "d" in D3? #25

Open TonyGoodDay2 opened 7 years ago

TonyGoodDay2 commented 7 years ago

example:

function (d)

cmitchell74 commented 7 years ago

the data associated with a given selection

syerrapothu commented 7 years ago

It allows you to pass in a function as the second parameter. As you discovered, this function will be called with the current data element as well as the index of the current data element. If the second parameter is not a function, it can use a value instead. d3.selectAll("circle") .attr("cy",function (d) { return percent_scale(d.late_percent);})