Class: CrossHair

StockChartX. CrossHair


new CrossHair(config)

Represents chart's cross hair cursor.
Parameters:
Name Type Description
config Object The configuration object.
Properties
Name Type Description
chart StockChartX.Chart The parent chart.
Requires:
  • module:JQuery

Requires

  • module:JQuery

Members


crossHairType :StockChartX.CrossHairType

Gets/Sets cross hair type.
Type:
Default Value:
Example
crossHair.crossHairType = StockChartX.CrossHairType.MARKERS;

visible :boolean

The flag that indicates whether cross hair is visible. It does not change cross hair type.
Type:
  • boolean

Methods


applyTheme()

Applies theme to the HTML controls.

hide()

Hides cross hair.

layout()

Layouts elements.

setPosition(point, animated)

Moves cross hair into a given position.
Parameters:
Name Type Argument Default Description
point StockChartX.Point The destination point.
animated Boolean <optional>
true The flag that indicates whether animation frame should be requested to set the position.
Example
crossHair.setPosition({x: 100, y: 200});

show()

Shows cross hair (if cross hair type is not set to NONE).

updateMarkers()

Updates markers text and size.