1. 横轴xAxis,不设置type,默认是linear类型。若想按时间轴展示数据,则type改成datetime,加上自定义横轴的时间显示格式
type:"datetime"
dateTimeLabelFormats:
{
second: '%H:%M:%S',
minute: '%e. %b %H:%M',
hour: '%b/%e %H:%M',
day: '%e日/%b',
week: '%e. %b',
month: '%b %y',
year: '%Y'
}
2. 填充的数据series: ydata
其中ydata按下面格式生成:
"data" : [[13位时间戳1,值1],[13位时间戳2, 值2],..., [13位时间戳3, 值3]] #比如对应于从数据表取得某列的值+对应时间列的值组成,注意时间转成时间戳就行
"name" : "January" #其实就是图例名称
参考
http://blog.csdn.net/dushenzhi/article/details/17242023