block by curran 1fb2ae1dfc1471972904

Reusable Scatter Plot

Full Screen

A reusable D3 scatter plot, constructed using Towards Reusable Charts and Standalone Scatter Plot as inspiration.

In the original reusable charts example, the comments state

// Convert data to standard representation greedily;
// this is needed for nondeterministic accessors.

In this adaptation, a simplifying assumption was made that no nondeterministic accessors will be given. Going one step further, an assumption was made that accessors will only want to access specific “columns” of data, meaning properties on each row object.

web counter

index.html

iris.csv

main.js

scatterPlot.js