DV TASK-8(Q2)
This stacked bar chart shows the distribution of movie ratings within different genres, with each segment representing the percentage of a specific rating level. Hovering over a segment reveals a tooltip displaying the exact percentage for that rating and genre. Built with D3.js v7, the visualization uses `d3.stack()` for data processing, `d3.scaleBand()` for the genre axis, and `d3.axisBottom()` for the percentage axis. The SVG renders color-coded rectangles, and the tooltip uses HTML positioning. The chart is based on rating data from the `iris.csv` dataset.
AI-generated descriptionThe impact of genre on movie ratings
This stacked bar chart gives the percentage of each rating level within different movie genres. The aim is to show the impact of genre on movie ratings. When the mouse hovers over each bar, you can see pop-ups of accurate percentage of each rating level within each genre. Total percentage is 1, representing 100%.
Comments
Sign in to join the discussion.