-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smooth interpolation between values? #47
Comments
I would look at modifying |
Also, the horizon rendering code draws one rectangle per pixel. In other words you need the same number of data points as you have pixels in your graph. Hope that makes sense! |
I see value in doing this on the Cubism side, although it might also be nice to have Graphite do it; smoothing is a pretty useful feature to mitigate noise in metrics. If you were to do this on the Cubism side, I expect you could compose a smoothing algorithm with another metric implementation, similar to how time-shifting and metric arithmetic are implemented. A simple method of smoothing is interpolating the previous value with the new value. So, if the underlying metric reports a new value of v1, the smoothed metric blends this with the previous value v0 and reports v0 + (v1 - v0) * α, where α is a parameter in the range [0, 1] depending on how much smoothing you want. |
Hi, In our case, we're looking at using it with a Cube backend - not Graphite. It would be nice to be able to just switch this on in Cubism, regardless of the backend - Cube, Graphite, CSVs, your own custom one etc. Just so I understand what @mbostock is saying - we add another another OperatorPrototype to metric-operator.js so that when given a metric, it doesn't report the real metric, but rather something in-between the last known value and the real metric? Cheers, |
The metric operators derive a new metric, which in this case would compose the original metric with a smoothing function. So metric.subtract(50) doesn’t modify the metric, it returns a new metric whose values are the original values minus 50. |
Hi, @RandomEtc How hard do you reckon this would be to implement? Is this something that's on the horizon? (See what I did there...lol). Cheers, |
@victorhooi I have no idea, sorry. I'm not planning to work on this myself. |
Hi,
Is it possible to add an argument to Cubism.js that will allow it to do smooth interpolation between values, or over missing values?
Somebody asked about it on SO here:
http://stackoverflow.com/questions/13732309/interpolation-on-cubism-graphs
and the answer mentioned using custom interpolators in D3:
http://bl.ocks.org/mbostock/3310323
Is something like that possible to add into Cubism.js?
Cheers,
Victor
The text was updated successfully, but these errors were encountered: