square / cubism

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

serverDelay() does not respect delays where data is from prior day #65

Open dmrenton opened 10 years ago

dmrenton commented 10 years ago

serverDelay() only allows for delays from teh current day from what I can tell. E.g. Look at the stock demo: http://bost.ocks.org/mike/cubism/intro/demo-stocks.html

The axis is showing the most current data is from year 2015, when in fact it is from 2012 (see http://bost.ocks.org/mike/cubism/intro/stocks/AAPL.csv) and here is the demo code var context = cubism.context() .serverDelay(new Date(2012, 4, 2) - Date.now()) .step(864e5) .size(1280) .stop();

I'm trying to trace through and see where this is happening, but maybe someone can beat me to it?