I have a jqPlot line graph and I'm trying to figure out what the Highlighter text is for the X value .
I have the following:
var line1 = [100, 68, 63, 36, 28]; Var line 2 = [100, 71, 68, 42, 32]; Var line3 = [100, 60, 45, 15, 5]; Var line 4 = [100, 76, 58, 22, 8]; Var plot3 = $ .jqplot ('chart3', [line1, line2, line3, line4], {axes: {xaxis: {ticks: [[1, 'group1'], [2, 'group2'], [3, 'Group 3'], [4, 'Group 4'], [5, 'Group 5']], Tickwickon: {Show gridlines: wrong,},}, yaxis: {label: 'percent', label presenter: $ .jqplot.CanvasAxisLabelRenderer, which displays the graph correctly with the X-axis reading group 1 group 2 etc. ... However, when: I add the Highlighter option and for example display line 1 tick 2 box Is "2.0, 68". What I would like to do is display "group 2, 68" I
Thank you.
I I can come up with a solution, maybe not the best, but the most suitable one, which I could think immediately for considering the code you showed. The code below lly on every mouse move, where is the neighbor is not zero (this is the condition used to show highlights tooltips) I change the tooltip in the same way The front. (If "neighbor") ($ ( ". Jqplot-highlighter- tooltips"). Html ("+ + plot.axes.xaxis.ticks [neighboring pointIndex] [1] +", "+ datapos.yaxis.toFixed (2) +" Oi ")}}});
Comments
Post a Comment