Skip to main content
100%

d3js workshop - bar chart

✓ Published0🌍 Public
OOValdivia110
Last edited Oct 19, 2017
Created on Oct 19, 2017

This bar chart displays the total points earned by Premier League teams as of February 21, 2015, using horizontal rectangles whose widths are scaled by the d3.scale.linear function. The chart is rendered as an SVG, with each bar grouped into a <g> element that also contains a text label showing the point value. Built with D3 v3, the code loads data from a CSV file, coerces the PTS column to numbers, and sets the x-domain to the maximum points value. The bars are positioned using d3.selectAll("g") with transform translations, and the height remains fixed per record.

AI-generated description

Built with blockbuilder.org

forked from <a href='http://bl.ocks.org/mostaphaRoudsari/'>mostaphaRoudsari</a>'s block: <a href='http://bl.ocks.org/mostaphaRoudsari/26eda28ec7589c8f8ed0811f0b3924b8'>06_workshop_horizontal bar chart</a>

mit Licensed

Similar vizzes