我有一个这样的折线图,包含日期数据(不包括时间)
new Chartkick.LineChart("chart-2", {"2013-02-10": 11, "2013-02-11": 6});
为什么chartkick总是要包括时间? 我如何仅在日期中显示该系列?
答案 0 :(得分:3)
这是答案,离散和hAxis,
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});