//以X軸為年月,Y軸為百分比為例
var percent = [];//ex: ['20','50','70'']
var yearmonth = [];//ex: ['201701','201702'','201703']
//PLOT的ID,以LineChart為例
var plot1 = $.jqplot('JQLineChart1', [percent],//百分比 {
title: 'TAT Target', //PLOT的Title
seriesDefaults: {
pointLabels: { show: true }
},
axes: {
xaxis: {//X軸
renderer:
$.jqplot.CategoryAxisRenderer,
ticks: yearmonth //年月
},
yaxis: {//Y軸
min: 0, //刻度最小值
max: 100, //刻度最大值
}
}
});
plot1.replot();//重製圖表