Skip to main content
100%

Line Plot with menu

✓ Published2🌍 Public
WW9183907
Last edited May 17, 2020
Created on May 17, 2020

This interactive line plot shows how commodity prices change over time, with a dropdown menu letting users switch between different price columns from the dataset. The visualization uses D3 v5 with a modular component approach, where a reusable `dropdownMenu` function handles the selection interface and a `scatterPlot` component manages the SVG rendering. The code applies `d3.scaleTime` for the x-axis, `d3.scaleLinear` for the y-axis, and a `d3.line` generator with `curveBasis` to create smooth paths. Transitions animate the line update when the user selects a new column, while axis ticks include gridlines for readability.

AI-generated description
MIT Licensed

Similar vizzes