Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interpolation on Cubism graphs

Cubism was designed, by mbostock's own words, for maximum information density - which means it generally wants to display one datapoint per pixel. While this is useful in many cases, it doesn't help when your data itself is not that dense. In these cases, you get ugly, staccato-style graphs like so:

enter image description here

Is there a way to interpolate my data/graph within Cubism to show a nice, smoothed graph?

EDIT:

After adding keepLastValue to the metric, I get this:

enter image description here

Here is the same data as shown in Graphite: enter image description here

I would like to smooth the Cubism view to look more like Graphite (with the added awesomeness of the horizon overplotting)

like image 460
Abe Stanway Avatar asked Nov 04 '22 09:11

Abe Stanway


1 Answers

Cubism doesn't do this automatically, but d3 has an interpolator you can use to fill in the in-between values. Here is an example from Mike Bostock using a custom line interpolator; you're probably fine with the default one.

like image 63
polm23 Avatar answered Nov 14 '22 23:11

polm23