0

我有一个带有日期数据(不包括时间)的折线图

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

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

为什么chartkick 总是要包含时间?我如何仅在日期中显示该系列?

4

1 回答 1

3

这就是答案,离散和 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});
于 2014-04-24T04:50:12.977 回答