I am rendering a bar chart in my code but since I have too many x axis data points, the tooltip doesnt show. Can anyone help here?
My code is:
plot = $.jqplot(chartID, [xAndyVals],
{
title: tempKey,
seriesDefaults: {
pointLabels: { show: true },
},
series: [{ renderer: $.jqplot.BarRenderer }],
axesDefaults: {
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: {
angle: -30,
fontSize: '10pt',
}
},
axes: {
xaxis: {
ticks: xTicks,
},
yaxis: {
min: 0,
max: yMaxVal,
}
},
highlighter: {
show: true,
sizeAdjust: 7.5,
tooltipContentEditor: tooltipContentEditor
},
cursor: {
show: false,
showTooltip: true
},
});
function tooltipContentEditor(str, seriesIndex, pointIndex, plot) {
var plotData = plot.data[seriesIndex][pointIndex];
var tooltip = mapping.get(plotData[0]);
return tooltip + ", " + plotData[1];
}
Sample xAndyVals
is [0, 152518]
, where 0
is the x axis value and 152158
is the y axis value.