Skip to main content
100%

Task8_Question2

✓ Published0🌍 Public
Jjyothirmaijyothi2017@gmail.com
Last edited Apr 14, 2024
Created on Apr 14, 2024
Forked from Hello VizHub

A stacked bar chart displays the hours seven people spend across six hobbies—Outdoors, Indoors, Reading, Shopping, Fitness, and Travel—using a diverging color palette. The horizontal bars encode total hours per person, segmented by hobby, with a tooltip revealing exact values on hover. The visualization is rendered with D3 v7, using `d3.stack`, `d3.scaleBand`, and `d3.scaleLinear` to construct the chart, while `.on('mouseover')` events manage a custom tooltip. Data is loaded from a CSV file, and the SVG output is styled with custom fonts and a soft background.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes