Skip to main content
100%

Visualization: Sales Distribution by Country (Bar Chart)

✓ Published0🌍 Public
PPriyank Singh
Last edited Apr 23, 2024
Created on Apr 23, 2024
Forked from HTML Starter

This example shows a bar chart of sales amounts by country, with two bars displaying the dataset values from the USA, UK, and Canada. The visualization uses an SVG rendering approach with D3.js v7, employing `d3.scaleBand` for the x-axis, `d3.scaleLinear` for the y-axis, and `d3.axisBottom` and `d3.axisLeft` to create the corresponding axes. Bar rectangles are appended to the SVG container with their width determined by the scale’s bandwidth and their height proportional to the sales values.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes