1. 橫軸xAxis浮创,不設(shè)置type峦耘,默認(rèn)是linear類(lèi)型陈醒。若想按時(shí)間軸展示數(shù)據(jù),則type改成datetime琢唾,加上自定義橫軸的時(shí)間顯示格式
? ? ? ? ? ? ? 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. 填充的數(shù)據(jù)series: ydata
其中ydata按下面格式生成:
? ? ? ? ? ?"data" : [[13位時(shí)間戳1,值1],[13位時(shí)間戳2巾钉, 值2]瘫镇,..., [13位時(shí)間戳3, 值3]] ?#比如對(duì)應(yīng)于從數(shù)據(jù)表取得某列的值+對(duì)應(yīng)時(shí)間列的值組成盖溺,注意時(shí)間轉(zhuǎn)成時(shí)間戳就行
? ? ? ? ? ?"name" : "January" ?#其實(shí)就是圖例名稱(chēng)
參考
http://blog.csdn.net/dushenzhi/article/details/17242023