Books with Pages
✓ Published1🌍 Public
This example displays a horizontal bar chart of nine books sorted by page count, with book titles on the y-axis and a linear pages scale on the x-axis. It uses d3.csv to load data, d3.scaleBand and d3.scaleLinear for positioning, and d3.axisLeft and d3.axisBottom with custom tick formatting. The bars are rendered as SVG rectangles with a steelblue fill, and the code removes default axis domains and gridlines. A CSS rule with overflow:hidden removes scroll bars from the body.
AI-generated descriptionA fork of @leorawe: Books with Pages that shows how to get rid of the scroll bars.
The following CSS was added to the body section:
margin: 0px;
overflow: hidden;
MIT Licensed