Viewing a saved revision (read-only)
45088d1d17c34c8a9d1896fa1a881499
A6 Diverging Bar Chart D3
This diverging bar chart visualizes the percentage-point change in smoking rates between 2011 and 2012 across five countries, with positive differences extending rightward in blue and negative differences leftward in red from a central zero axis. The chart uses D3.js v7 to load the CSV dataset, compute the absolute maximum difference for symmetric axis scaling, and render SVG rectangles with horizontal orientation. A d3-scale linear color scale maps negative to positive values through light grey, while the d3-legend plugin adds a horizontal color legend. Hovering highlights bars in orange, and the chart includes labeled axes for both percentage difference and country names.
AI-generated descriptionUsed my old Bar Chart Visualization.
The csv file doesn't quite make sense as the percentage of total smokers should not be less than the percentage of both male and female smokers.