I’m doing some form of data visualization learning for 180 days because I need to #JFDI.
See post explaining how and why I’m doing this.
Code Learning:
Longer Takeways since took the weekend off
Chapter 3 Data-Driven Design and Interaction
- A modal dialogue is a way of describing a “floating area” that typically only shows up when you click an element. Typicaly, youou write HTML table file separately in another file.
- Example of a function to create a div with ID “model” to add loaded HTML code using .html() function:
d3.text(“resources/modal”, function(data) {
d3.select(“body”).append(“div”).attr(“id”, “modal”).html(data)
});teamG.on(“click”, teamClick);function teamClick(d) {
d3.selectall(“td.data”).data(d3.values(d))
.html(function(p) {
return p
});
};If you use d3.html(), you get HTML nodes that allow to do more sophisticated manipulation.
Leave a Reply