🌍 Public
Viewing a saved revision (read-only)
05a605e97dfd4ca9bf98d93b64566171
Selecting a year on a line chart using React
A line chart displays mental health disorder rates in Costa Rica from 1990 to 2017, with a dropdown menu to switch between seven disorder categories. The chart uses React and D3 v5, rendering an SVG with a vertical black line that follows the mouse cursor to select a year. This selection is computed by inverting the x-scale from the mouse position, and the x-axis uses a time scale with yearly ticks. Data comes from a CSV file loaded via `d3.csv`.
AI-generated description