Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 8_task2

Public visualization

Viewing a saved revision (read-only)

83c9bca8504c48a487867fc31d7dd69e

Activity 8_task2

0 stars0🌍 Public
Sshivasaikumart@gmail.com
Last edited Apr 13, 2024
Created on Apr 13, 2024
Forked from Hello VizHub

A 100% stacked horizontal bar chart shows the proportion of six food categories (Fruit, Vegetables, Meat, Dairy, Grains, Snacks) receiving ratings from "Below 4" to "Above 8" on a scale of 0 to 1. The visualization uses D3.js v7 with an SVG renderer, employing d3.stack() with keys for the rating columns and d3.scaleBand() for category placement. Tooltips display the exact percentage for each category-rating segment, while d3.axisBottom and a custom legend annotate the chart.

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.