itai
itai

Reputation: 302

javascript chart library for every minutes data

i'm looking for an open source java script library to accomplish a line chart of time-value one series, that updating every 1min, and showing the last 24h, eg: 24*60 = 1440 points that will create a line chart, i want the x-index to be 1h units, e.g if now is 16:04, will be 16:04(yesterday) - 16:04 today.

data set is:

16:04 - [value]

16:05 - [value]

...

00:02 - [value]

...

15:27 - [value]

...

16:04 - [value]

x 1440 lines records

but the index must be in full hour 16:00, 17:00.. 16:00, with 60 points resolution.. and i need the chart to update every minute with ajax that every minute old record (eg: 16:04 yesterday) will be deleted and new record will be updated (16:05). (so the chart will appear moving (possibly with effect))

i couldn't find any library that can do that kind of chart, please help, did anyone implemented this kind of chart before?

can it be done with chart.js? it's need to be open-source library.

thanks allot! really appreciate it!

EDIT:

this is what i got so far: http://jsfiddle.net/wbvwadkb/1

BUT i have a major problem with the line labels- it's overlapping and messed up... can anyone help me edit this jsfiddle and fix the lables?

i need the mouse hover label- but to show up only one point...

thanks.

Upvotes: 0

Views: 584

Answers (2)

Sabba
Sabba

Reputation: 257

To fix label add:

pointHitDetectionRadius : 0,

see last line of http://jsfiddle.net/hntsz4q8/

Upvotes: 1

Ben Looi
Ben Looi

Reputation: 178

You can use chart Js with AngularJS. Do an interval call to your api to update your data. Probably good to show some code to begin with.

Upvotes: 0

Related Questions