I am using JqPlot.
Here is my fiddle and below is my screenshot. I am using two y axis. On the left y axis I have my revenue and on my right y axis I have my page views.
Now on hover on the lines, I want to show both the Views and Revenue in the tooltip, as seen in the example below I am only able to get data from 2 axes at a time.
Any thoughts ?

Below is my code
$(document).ready(function () {
$.jqplot.config.enablePlugins = true;
s1 = [['23-May-08',1, 11],['24-May-08',4, 14],['25-May-08',2, 22],['26-May-08', 6, 26]];
s2 = [['23-May-08',11, 1],['24-May-08',14, 4],['25-May-08',22, 2],['26-May-08', 26, 6]];
plot1 = $.jqplot('chart',[s1, s2],{
title: 'Highlighting, Dragging, Cursor and Trend Line',
axes: {
xaxis: {
renderer: $.jqplot.DateAxisRenderer,
tickOptions: {
formatString: '%#m/%#d/%y'
},
numberTicks: 4
},
yaxis: {
tickOptions: {
formatString: '$%.2f'
}
}
},
highlighter: {
show:true,
},
cursor: {
show: true
},
series: [
{
lineWidth: 2,
highlighter: { formatString: "<div style='background-color:white; border:1px #ddd solid; width:220px; height:60px'>%s . Views : %s Revenue : %s </div>" }
},
{
yaxis: 'y2axis',
highlighter: { formatString: "<div style='background-color:white; border:1px #ddd solid; width:220px; height:60px'>%s . Views : %s Revenue : %s </div>" }
}]
});
});
Here is what I did, I used the
tooltipContentEditorproperty ofhighlighter. Check out the updated fiddle here.