shutterstock / rickshaw

JavaScript toolkit for creating interactive real-time graphs
https://shutterstock.github.io/rickshaw
MIT License
6.53k stars 941 forks source link

Rickshaw.Graph.Axis.Time Resolution #352

Open BrkCoder opened 10 years ago

BrkCoder commented 10 years ago

I am trying to write a real time graph based on dummy data for now. My problem is that the resolution for my graph is to big for me. my timeunits is hour but I get a range of of 16 hours which I don't need to see right now in the same graph. for example the graph strat in 00:00 and end in 16:00. I would like to have a resolution like that: 00:00 00:05 00:10 00:15 and so on....(update every five minute). I tried to work with timeunit=minute but I still get the same range which is now divided to a more points. This is my code for x-axis : var time = new Rickshaw.Fixtures.Time(); var hours = time.unit('hour'); var xAxis = new Rickshaw.Graph.Axis.Time( { graph: graph, ticksTreatment: ticksTreatment, timeUnit: hours, timeFixture: new Rickshaw.Fixtures.Time() } ); and this is my photo of the system: image

BrkCoder commented 10 years ago

please help, how to I get the same effect like in cubism.js where I can see data in units of minutes but without divided my long range of 17 hours into minutes but rather divide a range of (current hour -next hour)