Scatter Plot with Color Legend
✓ Published0🌍 Public
This example shows a scatter plot of Udemy courses, mapping the number of subscribers along both axes while coloring each point by course subject. The visualization includes a categorical color legend on the right, with circles using d3.scaleOrdinal for color mapping and d3.scaleLinear for positioning. The React components render SVG elements, with axes built from custom AxisBottom and AxisLeft components, and the data is loaded via d3.csv from a GitHub gist. A hover handler on the legend logs the selected subject value.
AI-generated descriptionA scatter plot of Udemy Courses with color legend.
MIT Licensed