我有一个由 jqplot 制成的折线图和条形图。问题是,每当我将光标放在条形图上时,折线图就会不可见。我希望用户能够在线图上移动光标,以便向用户突出显示一些信息。提前致谢。
编辑:
function gkDrawBarAndLineChart(location) {
var s1 = [4, 7, 9, 15];
var s2 = [12, 6, 19, 8];
var s3 = [[1, 28], [2, 13], [3, 54], [4, 47]];
var values= [s1,s2,s3]
var dates = ['2012-10-22', '2012-10-23', '2012-10-24', '2012-10-25']
var optionsObj = {
title: 'Report',
animate: !$.jqplot.use_excanvas,
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: dates
},
yaxis: {
tickOptions: { showMark: true, formatString: "%d" },
padMin: 0
},
},
grid: {
borderColor: "#fff",
background: "#FFF",
drawGridlines: true,
shadow: true
},
series: [
{label:'Open',renderer:$.jqplot.BarRenderer, },
{label:'Incoming', renderer:$.jqplot.LineRenderer, color:'red', },
{label:'Resolved', renderer:$.jqplot.LineRenderer, color:'green'}
],
legend: {
show: true,
location: 'ne'
},
seriesDefaults:{
shadow: false,
rendererOptions:{
barPadding: 0,
barMargin: 10,
barWidth: 25,
},
},
highlighter : {
show : true,
sizeAdjust : 7.5,
formatString:'<table class="jqplot-highlighter"> \
<tr><td>Timestamp:</td><td>%s</td></tr> \
<tr><td>Value:</td><td>%s</td></tr>',
},
};
var plot2 = $.jqplot(location, values, optionsObj);
}