Simple Bar Chart with d3.js
✓ Published0🌍 Public
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed