Skip to main content
100%

Simple Bar Chart with d3.js

✓ Published0🌍 Public
Aakshayvenishetty1437
Last edited Jul 21, 2023
Created on Jul 21, 2023
Forked from Hello VizHub

This example displays a simple bar chart visualizing five categorical values using D3 v6. The chart renders as an SVG with labeled axes, a title, and styled rectangles representing the dataset. The code loads D3 from UNPKG and uses core APIs including `d3.scaleBand`, `d3.scaleLinear`, `d3.axisBottom`, and `d3.axisLeft` to map data to visual elements. Although the project includes an ES6 module example, the main chart logic resides in a separate script file and renders entirely in the browser.

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