Skip to main content
100%

Fork of Labeled Animated Reusable D3 Scatter Plot

✓ Published0🌍 Public
Sserebryanaya.n@gmail.com
Last edited Mar 10, 2023
Created on Mar 10, 2023

This animated scatter plot cycles through the numeric columns of the Iris dataset, updating the x-axis to show each measurement while the y-axis remains fixed on petal width. Built with D3 v6, it uses SVG circles and smooth transitions to reposition points between axes, with axis titles sliding in and out. The visualization employs reusable chart components and demonstrates a looping animation driven by setInterval that sequentially calls the plot function with new data mappings.

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