🌍 Public
Viewing a saved revision (read-only)
64347e659b7e4f4d9a54b58d87976251
Racecard Bar Graph with D3.js
This example shows a horizontal bar chart of horse-race betting odds for eight horses, with each bar’s length representing the fractional odds and the y-axis labeling the horse names. The visualization uses D3.js v7 and renders as an SVG, with scales created via `d3.scaleLinear` for the x-axis and `d3.scaleBand` for the y-axis. The code loads data from a CSV file using `d3.csv`, applies axes with `d3.axisLeft` and `d3.axisBottom`, and appends rectangles for the bars.
AI-generated description