Bar chart with a Sequential color scale in D3
This bar chart displays the average fiber content across six cereal manufacturers, using a sequential color scale where darker green bars represent higher fiber values. The visualization relies on D3 v7 to load a cleaned cereal dataset from a CSV, scale the categorical x-axis with `d3.scaleBand` and the continuous y-axis with `d3.scaleLinear`, and render SVG rectangles for each bar. Colors are assigned via `d3.scaleSequential` with an interpolator, while a legend generated by the d3-legend library explains the color encoding. The chart includes labeled axes, a title, and a subtitle, with all data drawn from the provided cereal_fiber.csv file.
AI-generated descriptionCereal dataset from 'https://domo-support.domo.com/s/article/360043931814?language=en_US' The dataset provides nutritional data on 80 different breakfast cereals, and cleaning to be only 2 columns: manufacturer and avg_fiber.
The bar graph displays and compares the average fiber across 6 different cereal manufacturers.
The color and legend reference to 'https://d3-legend.susielu.com/'.