Skip to main content
100%

Fork of Animated Reusable D3 Scatter Plot

✓ Published0🌍 Public
SShreeti Upreti
Last edited Jun 29, 2022
Created on Jun 29, 2022

This animated scatter plot cycles through the numeric columns of the Iris dataset, plotting each feature against the last one. The visualization uses D3.js’s `scaleLinear`, `axisLeft`, and `axisBottom` to render axes, while `transition` animates the circles as the x-axis changes every three seconds. The code also implements reusable chart components with getter and setter methods, and includes axis titles that animate in and out.

AI-generated description

Added axis titles and animation to the x-axis label.

A couple of questions when making this update:

  1. When using the ternary operator continue does not seem to work whithin a for loop. line 43 of index.js

  2. Need to call the plot() function before i is incremented. Is this related to the fact that this is an async function? So will i only be evaluated within call() and not when the scatterPlot() instance is created? line 65 of index.js

MIT Licensed

Similar vizzes