Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

creating a bar chart using d3.js

Public visualization

Viewing a saved revision (read-only)

e4c0e314b53d44e4bf7a6d02dce2749b

creating a bar chart using d3.js

0 stars0🌍 Public
RRaja Srinivas Nelluri
Last edited Mar 7, 2022
Created on Mar 7, 2022

This example displays a horizontal bar chart ranking films by their audience scores, using a CSV dataset with movie titles and percentages. The visualization renders as SVG elements, with the y-axis positioning film names and the x-axis scaling scores from zero to the maximum value. Built with D3 v7, the code uses `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to construct the chart, while `csv()` loads the external data file. Rectangles are appended to a translated group, with bar widths proportional to each score.

AI-generated description