Visualization: "Description" and "Quantity" (Bar Chart)
✓ Published0🌍 Public
JJames Cruz
Last edited Apr 23, 2024
Created on Apr 23, 2024
This bar chart displays sales quantities for various product descriptions, with each bar representing a distinct item and its corresponding numeric quantity. The visualization uses D3.js v7 to generate an SVG bar chart, employing `d3.scaleBand` for the categorical x-axis and `d3.scaleLinear` for the continuous y-axis. The code includes labeled axes, rotated x-axis tick labels for readability, and value labels positioned above each bar. The sample dataset contains 26 products with quantities ranging from 2 to 32, rendered through a React-compatible HTML page that imports D3 from a CDN.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed