Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity6_Task-2

Public visualization

Viewing a saved revision (read-only)

36b50711f6dc42a793fcc7166728c275

activity6_Task-2

0 stars0🌍 Public
Ggolisanthoshi2000@gmail.com
Last edited Oct 22, 2024
Created on Oct 22, 2024

This stacked bar chart displays the nutritional composition of ten common foods, breaking down proportions of fiber, protein, fat, carbs, and vitamins along a horizontal percentage axis. Hovering over any segment reveals an interactive tooltip showing the exact percentage value. The visualization uses d3.stack() to generate layered bars, with d3.scaleBand and d3.scaleLinear handling positioning, while d3.scaleOrdinal assigns distinct colors to each nutrient category. Data comes from a local CSV file, rendered as SVG elements with mouseover and mouseout events driving the tooltip behavior.

AI-generated description

The 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%.