我正在尝试使用 jqplot 绘制一个堆叠条形图,顶部系列填充为白色并带有绿色轮廓。这可以通过普通选项实现吗,还是我必须通过 CSS 来实现?以下代码是我目前正在使用的。我基本上已经尝试过将所有基于颜色的选项都扔给它(我承认我对文档感到困惑)。对于第二个系列,我期待颜色“color”的轮廓和颜色“fillColor”的填充(即分别为蓝色和红色),但这不是正在发生的事情。任何人都可以帮忙吗?
//Bar Chart
var pots = ['Seats', 'Shoes', 'Refurb', '4 FatC2s', 'Lightweight Four'];
var moneyInPots = [50, 200, 300, 400, 600];
var moneyRemaining = [70, 300, 700, 500, 1900];
plot1 = $.jqplot('potGraph', [moneyInPots, moneyRemaining],
{
stackSeries: true,
seriesDefaults:
{
renderer: $.jqplot.BarRenderer,
pointLabels: {show: true}
},
axes:
{
xaxis:
{
renderer: $.jqplot.CategoryAxisRenderer,
ticks: pots
},
yaxis:
{
min: 0,
tickOptions: {formatString: '£%d'}
}
},
series:
[
{color: 'green', shadow: false},
{color: 'blue', fill: true, fillColor: 'red', fillAndStroke: true, shadow: false, fillToZero: true, fillAxis: 'y'}
]
});