Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Task2

Public visualization

Viewing a saved revision (read-only)

18b920d7cfee4ad9a286d41a45e0ca2e

Activity6_Task2

0 stars1🌍 Public
Aamarnadhkari98@gmail.com
Last edited Oct 25, 2024
Created on Oct 25, 2024
Forked from Hello VizHub

This stacked bar chart visualizes the distribution of sales percentages across four regions for five fruit products, using data from a CSV file. Each horizontal bar is segmented by region, with colors corresponding to a categorical color scale, and the x-axis measures percentage from 0 to 1. The visualization uses `d3.axisBottom`, `d3.axisLeft`, and `d3.scaleOrdinal` to render the axes and color encoding. Hovering over a segment triggers a tooltip that displays the precise sales percentage for that fruit and region, calculated via `d3.format`. The chart is rendered as an SVG using D3 v7.

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.