🌍 Public
Viewing a saved revision (read-only)
2f66548238b34e8ea1aa874d72c66ed8
Fork for SDV assn 6 M&K
This example visualizes the distribution of hero primary attributes by attack type, using grouped horizontal bars to compare counts of melee and ranged attacks across different attribute categories. The chart is rendered as an SVG via React and D3 v7, with data loaded from a CSV file and processed using `d3.group` to nest attack type counts within each primary attribute. Bars are colored using `d3.scaleOrdinal` with a light blue for melee and dark blue for ranged, while value labels are placed at the end of each bar. The visualization uses `d3.scaleBand` for the categorical y-axis and `d3.scaleLinear` for the numeric x-axis, with hover logging enabled for debugging.
AI-generated description