Search code examples
jqplot

jqplot: hide duplicate cursor position from second y axis


I have a graph in JQPlot, however, since I have two y-axis, I have two cursor plots, the second one doesn't really offer any useful information. enter image description here

Does anyone know how I can change this to just display one e.g. Tue 16:46, 16 Or alternatively, just show the x-axis e.g. Tue 16:46 and not display the y-axis at all.


Solution

  • The $.jqplot.Cursor.tooltipAxisGroups property solves this task. Just assign the array of axis names to display, like

    cursor: {
      tooltipAxisGroups: [['xaxis']]
    }
    

    Look at JSFiddle: jqPlot tooltipAxisGroups demo