Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Project - Horizontal Bar Chart for Total Sales of Sub-Category Product (Using React Tool and d3.js)

Public visualization

Project - Horizontal Bar Chart for Total Sales of Sub-Category Product (Using React Tool and d3.js)

0 stars0🌍 Public
AAnjan Shrestha
Last edited Apr 2, 2022
Created on Apr 2, 2022

This example shows a horizontal bar chart of total sales for product sub-categories, with bars rendered in blue on an SVG canvas. It uses React to manage state and lifecycle, while d3’s `csv` loads the dataset and `scaleBand` and `scaleLinear` map the categorical and numeric ranges. The chart draws gridlines and tick labels via `xScale.ticks()`, and each bar’s width represents sales value. The data is fetched from a GitHub gist URL.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed