Dropdown
✓ Published0🌍 Public
This example shows an interactive scatter plot of health care cost estimates, where a dropdown menu switches the x-axis values between Year and Out-of-Pocket Dental Services, while color encodes age group. The visualization uses d3.scaleLog for the x-axis, d3.scaleLinear for the y-axis, and d3.scaleOrdinal with d3.schemeCategory10 for coloring. A color legend supports hovering to highlight matching data points, and the data is loaded as CSV and parsed with d3.csvParse. The SVG rendering follows a modular pattern with separate functions for axes, legend, dropdown, and the main plot.
AI-generated descriptionA modification of the original Scatter Plot with Menus showing the addition of a color attribute selector menu.
MIT Licensed