Scatter Plot Including Species
This interactive scatter plot visualizes the Iris flower dataset, allowing users to explore relationships between quantitative measurements and species categories. Two dropdown menus dynamically change which columns are mapped to the x and y axes, with categorical values rendered as evenly spaced points and quantitative values using linear scales. The visualization is built as a reusable D3 component, utilizing `selection.on()` and `selection.dispatch()` for menu event handling, with `transition()` calls for smooth animation when updating circle positions, axes, and radius growth.
AI-generated descriptionContinuing on the previous episode, on this one we see how to add menus to the charts.
Allowing us to select different column for x and y axis to update the data displayed on those axis.
Use of :
-selection.dispatch() => to dispatch an event
-selection.on() => to listen to an event