Fork of Butter Macronutrients
✓ Published0🌍 Public
A bar chart displays the percentage of varicella cases in Bolivia by year, with bars colored teal by default and turning coral when clicked to highlight a selected year. The chart loads data from a CSV file, maps it with numeric year and percentage values, and renders axes and bars using d3.scaleBand, d3.scaleLinear, d3.axisBottom, and d3.axisLeft. A unidirectional data flow pattern in udf.js manages state, passing selections between viz.js, setupSVG.js, and renderBarChart.js.
AI-generated descriptionVaricella Cases in Bolivia
This visualization shows the percentage of varicella (chickenpox) cases in Bolivia over the years. Click on any bar to highlight it.
Files
index.html: Main HTML fileindex.js: Entry pointudf.js: Implements unidirectional data flow patternviz.js: Main visualization logicsetupSVG.js: SVG setup utilityrenderBarChart.js: Bar chart rendering logic
MIT Licensed