Fork of Webpage
✓ Published2🌍 Public
This example shows a stacked bar graph of the top 10 job titles by total salary, using data from a CSV file of data science salaries. Each bar represents a job title, colored via a categorical scale, with salary totals on the y-axis and rotated labels on the x-axis. The code uses `d3.csv` to load data, `d3.rollups` to aggregate salaries, and `d3.scaleBand` and `d3.scaleLinear` to set up the axes. It renders an SVG with `d3.axisBottom`, `d3.axisLeft`, and includes a legend built from the color scale.
AI-generated descriptionMIT Licensed