jqPlotを使用して、シリーズのデフォルトがの面グラフを描画しています。を変更することはできますが、線の色を変更する方法や、x 軸の線が 0 未満の塗りつぶしの方法が見つかりませんでした。緑色の正の値と赤色の負の値が必要です。現在、負の値のデフォルトは青です。jqPlot オプションは次のとおりです。fill: true, fillToZero: true
useNegativeColors
true
color
fillColor
var chartOptions = {
title: { show: false },
axesDefaults: {
show: false,
showGridline: false,
borderWidth: 0,
showTicks: false,
showTickMarks: false,
tickOptions: {
show: false,
showLabel: false,
showMark: false,
showGridline: false
}
},
axes: {
xaxis: { min: 0, max: 10 },
yaxis: { min: -5, max: 5 }
},
seriesDefaults: {
fill: true,
fillToZero: true,
fillAndStroke: true,
color: "rgba(190,230,110, 0.8)",
fillColor: "rgba(206,236,145, 0.8)",
shadow: false,
showMarker: false,
lineWidth: 1,
rendererOptions: {
highlightMouseOver: false
}
},
legend: { show: false },
grid: {
drawGridLines: false,
background: "rgba(255,255,255,0)",
shadow: false
}
};
編集:情報を追加:現在負の値のデフォルトは青