block by eesur 753e793903dad7aaa4c3

Sparse and missing data

Full Screen

Sparse and missing data

Sparse data can be really tricky to represent when dealing with real time data —especially as you don’t know when it will be sparse or dense, or even both in one representation.

These examples look at views with the same data. A chart showing reading per minute but the dataset doesn’t have values for each minute; they would be zero.

This example takes from this super article Padding for zero values but uses the difference of the start and end time to create an array to map to, instead of using the ticks()

The charts are rendered using the awesome [D3 Financial Components (D3FC)](https://github.com/ScottLogic/d3-financial-components`

index.html

fc_table.js

sparse_test.json