1

I want to create a graph in java script with time driven x axis ( x axis changes with time every 30 seconds and it moves) something like: http://canvasjs.com/editor/?id=http://canvasjs.com/example/gallery/dynamic/realtime_line/. what I did is that I get the current time with

var currentdate = new Date()
var datetime = (parseInt(currentdate.getHours() + ":"  
   + currentdate.getMinutes() + ":" + currentdate.getSeconds()))
   window.console.log(datetime)

and then I add 30 second to current time and show it on the x axis. but does any one know any other example of codes in which x axis show the time? something like: square.github.io/cubism – star

Thanks,

star
  • 317
  • 2
  • 6
  • 15
  • What do you want to do and what did you try? Where is your data coming from? – filmor Jun 26 '13 at 11:01
  • I have generated some json file and I want to fetch them dynamically over time every 3 seconds. So I want my x axis show the current time and y axis show the value of the json file. or to make it simpler suppose I have generated some random value between 1 and 150 and I want the x axis show the time. something like: http://square.github.io/cubism/ – star Jun 26 '13 at 11:16
  • Still, this is quite a broad question. You are just looking for other libraries that do that for you? Then I'd suggest going through the links on http://stackoverflow.com/questions/119969/javascript-chart-library and closing this question. – filmor Jun 26 '13 at 11:21

0 Answers0