Skip to main content
100%

Fork of 11

✓ Published0🌍 Public
NNita
Last edited Apr 6, 2025
Created on Apr 6, 2025
Forked from 11702358-ice 8

This visualization shows chocolate product sales across the USA and UK using a vertical hierarchical tree layout, with nodes representing sales representatives, products, and their associated sales values. Node size encodes sales figures, while color distinguishes product categories (Bars, Bites, Other). Built with D3.js v7, it uses the `d3.tree` layout, square link paths, and SVG rectangles for nodes. Interactive tooltips appear on hover, displaying product details or aggregated sales totals for organizational nodes, with smooth transitions applied to highlighting and tooltip visibility.

AI-generated description

Chocolate Sales Data Visualization

This project visualizes chocolate product sales data in the USA and UK using a hierarchical tree structure. The visualization shows sales representatives, their products, and sales values.

Features

  • Vertical tree layout showing the hierarchical relationship between regions, sales representatives, and products
  • Node size represents the sales value for each product
  • Color-coded nodes by product category (Bars, Bites, Other)
  • Interactive tooltips showing detailed information on hover
  • Clean, responsive design

Technologies Used

  • D3.js v7 for data visualization
  • Plain JavaScript, HTML, and CSS
  • No additional dependencies

How to Use

  1. Clone this repository
  2. Open index.html in your browser
  3. Explore the visualization:
    • Hover over nodes to see details
    • Node size indicates sales value
    • Colors represent different product categories

Data Structure

The visualization uses hierarchical data with the following structure:

MIT Licensed

Similar vizzes