Let's build a bar chart - d3fc version
This example recreates Mike Bostock’s classic bar chart using d3fc, showing letter frequencies from a tab-separated data file. The bars are colored by category, with vowels in indianred and consonants in steelblue, applied via the `decorate` pattern on `fc.seriesSvgBar`. Value labels appear above each bar using a custom `text` element added during decoration. The chart uses `fc.chartCartesian` with `d3.scaleBand` and `d3.scaleLinear`, while `fc.extentLinear` pads the y-domain and formats ticks as percentages. Data is loaded with `d3.tsv` and rendered as SVG.
AI-generated descriptionA re-implementation of Mike Bostock's classic "Let's Make a Bar Chart" example, using d3fc. This example highlights the power of the decorate pattern, with the bar colour changed on decorate, and value labels added.