d3 is better and easier than I remember

This week is lab week at work, and I decided in anticipation of the hackathon I will (!!) shortly be attending, I decided to work with a team to visualize their data using d3 to make an interactive visualization, since their team is working in that direction.

What I mostly learned is that d3 is way easier than I remember.

How I remember d3

How d3 actually is

Maybe not quite fantastically rainbow-y, but two things are likely true since I looked at d3:

1. I’m better at JavaScript
2. d3 has WAY better documentation

The essence of d3:

jQuery + data bindings

I made a basic fiddle of the simplest thing I learned in d3.

d3 party
Steps:

Select an area on the page (jQuery-eqsue) to put your stuff

SelectAll of what you’re going to operate on

Add data to the picture (array-type or like data, as far as I know)

Enter into the data

Append elements based on that data, where you have access to the data and index attributes (d and i in the bin)

Tags: , , ,

No comments yet.

Leave a Reply