square / cubism

Cubism.js: A JavaScript library for time series visualization.
https://square.github.com/cubism/
Other
4.94k stars 529 forks source link

no graphite data appears in graphs when using derivative function #30

Open timurb opened 12 years ago

timurb commented 12 years ago

When using derivative or some other processing function for accessing graphite metric like nonNegativeDerivative(collectd.ts_toa.interface-ppp0.if_octets.rx) initial set of data appears in the graph but it is not updated.

Graphite seems to calculate function only for the requested period so derivative for a single data value produces zero and we therefore receive no data for update. I can check that in chrome console.

If I remove the call for nonNegativeDerivate function from metric definition the data seems to be displayed ok (but it becomes not very useful in this case) so I don't think this is the issue with my setup.

Graphite 0.9.10 is used and cubism.js.v1.min.js from gh-pages branch.

dreadatour commented 11 years ago

I has this problem also. Could you, please, try this fix? https://github.com/dreadatour/cubism/commit/9718733402bbbbb554a49b8c2ab739cbd86cef4e#L0R206