Perspective + d3fc
This example shows a grouped bar chart of Olympic medals (gold, silver, bronze) won by the United States across different years, using Perspective to aggregate the underlying data and d3fc to render the visualization. The chart displays three colored bars per year, with the y-axis scaled in millions and formatted using `d3.format(".2s")`. Perspective’s `table` and `view` objects perform the row pivoting on year and sum the medal counts, while d3fc’s `seriesSvgGrouped` and `chartSvgCartesian` construct the Cartesian plot. The data is loaded from a JSON file via `XMLHttpRequest`, and the bar colors are assigned via a D3 ordinal scale.
AI-generated descriptionAn example chart which combines JPMorgan's Perspective, which D3 and Scott Logic's d3fc.
Built with blockbuilder.org