Question

I'ved got a line chart like this with date data (not including time)

 new Chartkick.LineChart("chart-2", {"2013-02-10": 11, "2013-02-11": 6});

http://jsfiddle.net/yekLh/1/

why does chartkick always have to include time ? how do i show the series in dates only ?

Was it helpful?

Solution

This is the answer, with discrete and hAxis,

http://jsfiddle.net/yekLh/5/

new Chartkick.LineChart("chart-2", 
 {"2013-02-10": 11, "2013-02-11": 6, "2013-02-12": 12, "2013-02-13": 5}, 
{"library":
        {title: "Company Performance",
        "hAxis":{"title":"Date","gridlines":
            {"count":3,"color":"#CCC"},"format":"dd/MM/yy"}}, 
        "discrete": true});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top