Skip to main content
100%

Bar Chart + Axis customisation

✓ Published5🌍 Public
SSharvariPhadke
Last edited Jan 15, 2021
Created on Jan 13, 2021
Forked from Making a face

This example shows a horizontal bar chart of population by country, using a blue gradient fill for the bars and a custom orange-to-red gradient for axis tick labels. The visualization demonstrates axis and scale customization with d3.scaleLinear, d3.scaleBand, d3.axisLeft, and d3.axisBottom, including formatted tick labels (e.g., converting "G" to "B" for billions) and extended tick lines. Data is loaded from a CSV file via d3.csv, with population values multiplied by 1000 during parsing. The SVG rendering applies margins, a title, and axis labels through d3 selections and SVG attributes.

AI-generated description
MIT Licensed

Similar vizzes