$.jqplot.Highlighter

A tooltip providing information about the data point is enabled by default. To disable the tooltip, set “showTooltip” to false.

You can control what data is displayed in the tooltip with various options. The “tooltipAxes” option controls whether the x, y or both data values are displayed.

Some chart types (e.g. hi-low-close) have more than one y value per data point. To display the additional values in the tooltip, set the “yvalues” option to the desired number of y values present (3 for a hlc chart).

By default, data values will be formatted with the same formatting specifiers as used to format the axis ticks. A custom format code can be supplied with the tooltipFormatString option. This will apply to all values in the tooltip.

For more complete control, the “formatString” option can be set. This Allows conplete control over tooltip formatting. Values are passed to the format string in an order determined by the “tooltipAxes” and “yvalues” options. So, if you have a hi-low-close chart and you just want to display the hi-low-close values in the tooltip, you could set a formatString like:

This option requires jQuery 1.4+ True to bring the series of the highlighted point to the front of other series.

Properties

show

this.show = $.jqplot.config.enablePlugins

true to show the highlight.

markerRenderer

this.markerRenderer = new $.jqplot.MarkerRenderer(

{shadow:false}

)

Renderer used to draw the marker of the highlighted point. Renderer will assimilate attributes from the data point being highlighted, so no attributes need set on the renderer directly. Default is to turn off shadow drawing on the highlighted point.

showMarker

this.showMarker = true

true to show the marker

lineWidthAdjust

this.lineWidthAdjust = 2.5

Pixels to add to the lineWidth of the highlight.

sizeAdjust

this.sizeAdjust = 5

Pixels to add to the overall size of the highlight.

showTooltip

this.showTooltip = true

Show a tooltip with data point values.

tooltipLocation

this.tooltipLocation = 'nw'

Where to position tooltip, ‘n’, ‘ne’, ‘e’, ‘se’, ‘s’, ‘sw’, ‘w’, ‘nw’

fadeTooltip

this.fadeTooltip = true

true = fade in/out tooltip, flase = show/hide tooltip

tooltipFadeSpeed

this.tooltipFadeSpeed = "fast"

’slow’, ‘def’, ‘fast’, or number of milliseconds.

tooltipOffset

this.tooltipOffset = 2

Pixel offset of tooltip from the highlight.

tooltipAxes

this.tooltipAxes = 'both'

Which axes to display in tooltip, ‘x’, ‘y’ or ‘both’, ‘xy’ or ‘yx’ ‘both’ and ‘xy’ are equivalent, ‘yx’ reverses order of labels.

formatString

this.formatString = null

alternative to tooltipFormatString will format the whole tooltip text, populating with x, y values as indicated by tooltipAxes option. So, you could have a tooltip like: ‘Date: %s, number of cats: %d’ to format the whole tooltip at one go. If useAxesFormatters is true, values will be formatted according to Axes formatters and you can populate your tooltip string with %s placeholders.

yvalues

this.yvalues = 1

Number of y values to expect in the data point array. Typically this is 1. Certain plots, like OHLC, will have more y values in each data point array.

bringSeriesToFront

this.bringSeriesToFront = false

This option requires jQuery 1.4+ True to bring the series of the highlighted point to the front of other series.