Making a Bar Chart
✓ Published0🌍 Public
This horizontal bar chart visualizes the fuel efficiency of various car models, ranking them by their miles per gallon (MPG) value. The data is sourced from a CSV file and loaded using D3's `csv` function, with MPG values scaled down for display. The visualization is built with D3 v5, using `scaleLinear` for the x-axis and `scaleBand` for the categorical y-axis. Bars are rendered as SVG rectangles, with axes added via `axisLeft` and `axisBottom`, and the chart is styled with a steelblue fill for the bars.
AI-generated descriptionThis bar chart shows cars with their MPG. the source comes from https://perso.telecom-paristech.fr/eagan/class/igr204/datasets
MIT Licensed