0
我使用flot來繪製特定月份的計劃賬單付款。我該如何區分相對於當天繪製的線形圖的顏色,即過去的日期應該有一種顏色,未來的日期應該有不同的顏色?使用jquery flot在同一佔位符中繪製兩個不同圖表
我使用下面的代碼:
$.plot($("#placeholder1"), [current_d1,current_d2],options_current);
current_d1
和current_d2
是我的兩個陣列和options_current
是佔位符定義的選項。
var options_current= {
series: {
//dashes: { show: true, shadowSize: 0, steps:true},
lines: { show: true,lineWidth:5,steps:true},
points: { show: true,radius:4 },
color: ('#0000ff'),
threshold: {below:0, color: "#DF0101"}
},
xaxis: {min:1,max :max_value_current, tickFormatter: dayFormatter,tickColor: "rgba(255, 255, 255, 0)", tickDecimals:0,ticks:max_value} ,
yaxis: {min:1,tickFormatter: dollarFormatter} ,
grid: { hoverable: true, clickable: true,
borderWidth: 0,
markings: [
{xaxis: {from:temp_day, to: temp_day}, color: '#A4A4A4'},
{xaxis: {from:1, to: 1}, color: '#000000'},
{yaxis: {from:1, to: 1}, color: '#000000'}
]
},
legend: { position: 'se'}
};