0

start date/time: 1 Jan 2014 10:30:00 end date/time: 1 Jan 2014 14:30:00 step: every 5 minutes plot values provided

function myMetrics(name) {
    return context.metric(function(start,stop,step,callback){
    var values = [];
    console.log("start = " + start);
    console.log("stop = " + stop);
    return values;
}
  1. Can this be done using Cubism.js?
  2. How do I set the start and end time range? - tried scale context.scale.domain([format.parse("2015-03-18 10:30:00").getTime(), format.parse("2015-03-18 13:30:00").getTime()]); myMetrics function shown above prints different start and end date
  3. How can this be done?

1 Answers1

0

You should use the cubism.context() which does help you alter/customize what you are trying to achieve. Something like this:

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

for more details check out this post: Change scale default in cubism.js

Community
  • 1
  • 1
edwin
  • 72
  • 8