Skip to main content
100%

Fork of Making a Bar Chart

✓ Published0🌍 Public
SSwapna1915
Last edited Jul 26, 2023
Created on Jul 25, 2023
Forked from Hello VizHub

This example displays a horizontal bar chart of brand ratings from a CSV dataset, with each bar’s length proportional to the rating value. It uses D3 v5’s `scaleLinear` and `scaleBand` for positioning, along with `axisLeft` and `axisBottom` for axes. The SVG is rendered via D3 selections, with margins and labels for the axes. Data is loaded asynchronously with `csv`, and ratings are converted to numbers before rendering. The chart highlights brand comparison, with blue bars and a clean layout.

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