Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript charting library which can do y-axis --> Time and x-axis ---> Date

I am looking for a Javascript chart library which can produce charts where on the Y-Axis is the Time and on the X-Axis is the Date.

I have an overview here:

http://en.wikipedia.org/wiki/Comparison_of_JavaScript_charting_frameworks

But if anyone knows something I would like to hear it :-)

Greetings and thanks in advance!

Marco

like image 448
Marco Avatar asked Sep 29 '22 11:09

Marco


1 Answers

ZingChart can easily handle this. The scale objects accept Unix time values (in milliseconds) as values, and the "transform" object can be used to transform the Unix time into a more human-readable format using the tokens seen in this demo and on this doc page. This Epoch Converter is a useful tool for converting to Unix time.

Here's the sample scale-x configuration from the jsfiddle demo:

"scaleX": {
        "min-value": 1373045400000,
        "step": "day",
        "transform": {
            "type": "date",
            "all": "%d %M %Y",
            "item": {
                "visible": false
            },
            "guide": {
                "visible": true
            }
        }
    },

I'm on the ZingChart team, so let me know if you need any more help.

like image 160
Stalfos Avatar answered Oct 03 '22 06:10

Stalfos