adding menu to D3 Scatter Plot
✓ Published0🌍 Public
This example presents a D3.js scatter plot of the Iris dataset, with interactive dropdown menus that allow users to select which measurement columns (e.g., petal length, sepal width) are plotted on the X and Y axes. The visualization dynamically re-renders the SVG circles and axes based on the menu selections. It uses the `d3.scaleLinear`, `d3.extent`, `d3.axisLeft`, and `d3.axisBottom` functions from the D3 v6 library to handle scaling and axis generation. A custom `menu()` module builds the HTML select controls, and the plot reads data from a CSV file hosted on GitHub. The menu container is fixed at the top of the viewport, with the SVG plot filling the window.
AI-generated descriptionA vanilla HTML implementation of a D3 scatter plot. Shows the Iris Dataset.
MIT Licensed