I'm using jqPlot to display some nice charts. i want to use data['values'] for creating the chart. data['pointvalues'] for the highlighting tooltip and data['labels'] for the labels.
My plotcall is pretty basic:
var plot1 = $.jqplot ('chart', data['values'],{
cursor:{
show:true,
zoom:true,
showTooltip:false
},
series:{
},
legend: {
show: true,
placement: 'outsideGrid'
},
highlighter: {
show: true
}
});
Edit - Solution Labels:
legend: {
show: true,
placement: 'outsideGrid',
labels: data['labels']
},
Point Values in LineChart:
$('#chart').bind('jqplotDataMouseOver',
function (ev, seriesIndex, pointIndex) {
$('.jqplot-highlighter-tooltip').text('Kalenderwoche: '+(pointIndex+1)+' ,'+data['labels'][seriesIndex]+': '+data['pointvalues'][seriesIndex][pointIndex]);
$('.jqplot-highlighter-tooltip').css('opacity',1);
});