Skip to main content
100%

MasteringD3-Resusable-ProD3js-2.3B

✓ Published3🌍 Public
JJimMaltby
Last edited Dec 6, 2021
Created on Nov 28, 2021

This example demonstrates a reusable bar code chart pattern for visualizing time-series data, showing daily mention counts for multiple items alongside a corresponding data table. The visualization combines an SVG-based bar code representation with an HTML table rendered through foreignObject, using D3.js v5. The code implements the ProD3.js modular chart pattern, building on Mike Bostock's "Towards Reusable Charts" principles. It uses d3.timeDay for date intervals, d3.scaleTime for temporal scaling, and d3.select with foreignObject to embed the tabular HTML content within the SVG container.

AI-generated description

Exploration of bar code chart example, from Chapter 2 of Mastering D3.

It is derived from Mike Bostock's Towards Reusable Charts (https://bost.ocks.org/mike/chart/) as the source of the foundational principles.

Using the ProD3 pattern (Pro D3.js Use D3.js to Create Maintainable, Modular, and Testable Charts by Marcos Iglesias https://www.apress.com/gp/book/9781484252024) as the basis for charts pattern.

MIT Licensed

Similar vizzes