Skip to main content
100%

Fork of reusable scatter plot

✓ Published0🌍 Public
Ssriram.official9@gmail.com
Last edited Mar 28, 2024
Created on Mar 28, 2024

This example demonstrates a reusable scatter plot that visualizes inventory data, plotting Quantity on the x-axis and Price on the y-axis. It alternates between two halves of the dataset every five seconds, switching the displayed points and updating the axes and circles accordingly. The code uses D3 v6 APIs such as `scaleLinear`, `scaleOrdinal`, `axisLeft`, `axisBottom`, and `schemeCategory10` for coloring. The data is loaded from a CSV file, and the visualization renders in an SVG container with margins, axis labels, and animated transitions via `setInterval`.

AI-generated description
MIT Licensed

Similar vizzes