2 ms·
Geez. I've been trying to learn d3 for a blog post and holy shit is it impossible to analyze. So much obfuscation. I might liken raw HTML SVG info to machine co
by forrestthewoods 12y ago
Geez. I've been trying to learn d3 for a blog post and holy shit is it impossible to analyze. So much obfuscation. I might liken raw HTML SVG info to machine code and d3js to assembly. It's pretty nasty.
I feel like a scatterplot highlight should be the easiest god damn thing ever. The fact that it's this complicated seems like a clear indicator that something is broken, but I'm not sure what exactly. I might be inclined to blame the architecture of HTML/DOM?
- Gmo 12y agoyes d3.js is kind of an assembly for visualization and it's fine like that. But honestly, I don't see how those 2 lines .on('mouseover', this.rolloverOn(args)) .on('mouseout', this.rolloverOff(args)); could be made easier. What is above is "simply" the construction of the underlying voronoi diagram
- bengali3 12y ago> I feel like a scatterplot highlight should be the easiest god damn thing ever. For a charting library, yes I would expect this to be easy. But to be fair, D3js is not a charting library. The OP here is showing their version of a charting library based off of D3js. Remember, D3 = Data Driven Documents, which can be leveraged for extremely fast interactive visualizations For further clarification here is the goal/definition from D3js.org: "D3 allows you to bind arbitrary data to a Document Object Model (DOM), and then apply data-driven transformations to the document. For example, you can use D3 to generate an HTML table from an array of numbers. Or, use the same data to create an interactive SVG bar chart with smooth transitions and interaction." A charting library wouldn't give you the flexibility to do this: http://bl.ocks.org/mbostock/d8e15a0ab7f85818a5bd http://bl.ocks.org/mbostock/d8e15a0ab7f85818a5bd or this: http://bost.ocks.org/mike/shuffle/ http://bost.ocks.org/mike/shuffle/ Edit: a must see are the creations from the man himself. Mike Bostock http://bl.ocks.org/mbostock http://bl.ocks.org/mbostock