Reusable Scatter Plot with Menus
✓ Published0🌍 Public
This example shows an interactive scatter plot of automotive data from the auto-mpg CSV file, with dropdown menus that let the user switch which columns appear on the x- and y-axes. The plot uses D3 v5’s `scaleLinear`, `axisLeft`, `axisBottom`, and `extent` to build axes, while circles drawn in SVG animate into position via a chained `transition().duration(2000).delay()`. The dropdown options are generated by a custom ES6 module, `dropdownMenu`, imported alongside the reusable `scatterPlot` module that handles rendering.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed