Skip to main content
100%

Dropdown

✓ Published0🌍 Public
KKhatera Alizada
Last edited Apr 24, 2023
Created on Apr 15, 2023

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 description

A modification of the original Scatter Plot with Menus showing the addition of a color attribute selector menu.

MIT Licensed

Similar vizzes