0
我正在使用jqPlot來顯示一些漂亮的圖表。我想使用data ['values']來創建圖表。突出顯示工具提示的數據['pointvalues']和標籤的數據['標籤']。 jqPlot - 標籤數據,點值數據
我plotcall是非常基本的:
var plot1 = $.jqplot ('chart', data['values'],{
cursor:{
show:true,
zoom:true,
showTooltip:false
},
series:{
},
legend: {
show: true,
placement: 'outsideGrid'
},
highlighter: {
show: true
}
});
編輯 - 解決方案 標籤:
legend: {
show: true,
placement: 'outsideGrid',
labels: data['labels']
},
點值的線型圖:
$('#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);
});