🌍 Public
Viewing a saved revision (read-only)
71f70929f7204ddfbf7e75e21a3e08d3
Visualization: "Description" and "Quantity" (Bar Chart)
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.