【发布时间】:2013-05-08 20:01:29
【问题描述】:
我正在使用 flot 来绘制图表。我想实现该功能,以便能够突出显示图表中 10% 的增长,以不同于我现在使用的颜色显示。 我使用的代码是:
var options_blue = {
series: {
color: 'blue',
threshold: { above: 5, color: 'green' },
bars: { show: true, barWidth: 20 * 20 }
},
xaxis: { show: false, min: 1 },
yaxis: { show: false, min: 1, max: max_value }
};
var options_red = {
series: {
color: '#ff0000',
threshold: { above: 10, color:'green' },
bars: { show: true, barWidth: 20 * 20 }
},
threshold: { above: 5, color: "yellow" },
xaxis: { show: false, min: 1 },
yaxis: { show: false, min: 5, max: max_value }
};
我正在使用 jquery.flot.threshold.js,但是超过阈值的图表颜色没有变化。
【问题讨论】:
标签: jquery graph flot threshold