Change scale default in cubism.js

后端 未结 1 1147
温柔的废话
温柔的废话 2021-01-21 02:53

I\'m using cubism.js to graph some static data from a JSON object. We want to be able to display a years worth of data, with a point for each day. I have the solution working pa

1条回答
  •  悲哀的现实
    2021-01-21 03:29

    The stocks demo from the intro talk does almost exactly this, using serverDelay to shift the displayed time window and stop to prevent updates:

    var context = cubism.context()
        .serverDelay(new Date(2012, 4, 2) - Date.now())
        .step(864e5)
        .size(1280)
        .stop();
    

    I think the API could be made more convenient to handle this specific case, but Cubism is designed primarily for real-time displays.

    0 讨论(0)
提交回复
热议问题