Skip to main content
100%

Interactive Color Legend with Menus

✓ Published1🌍 Public
AAlaouiadnane
Last edited Feb 20, 2020
Created on Feb 19, 2020

This interactive scatter plot explores the relationship between two user-selected attributes from the College Dataset, showing each institution as a circle colored by its public or private status. Two dropdown menus, built with ReactDropdown, control which numeric columns (such as Enroll, PhD, or Outstate) appear on the x and y axes. A custom color legend, implemented as an SVG component, highlights points of one category on hover while fading the others, using d3.scaleOrdinal for color mapping and d3.scaleLinear for axis scales. All marks and axes render as React components with d3 scales, with data loaded asynchronously via d3.csv.

AI-generated description

A scatter plot of The College Dataset.

Enroll: number of new students enrolled. Phd: Percent of faculty with Ph.D's Private: Public/Private indicator.

MIT Licensed

Similar vizzes