show method

void show(
  1. dynamic x,
  2. double y, [
  3. String coordinateUnit = 'point'
])

Displays the crosshair at the specified x and y-positions.

x & y - x and y values/pixel where the crosshair needs to be shown.

coordinateUnit - specify the type of x and y values given. pixel or point for logical pixel and chart data point respectively.

Defaults to point.

Implementation

void show(dynamic x, double y, [String coordinateUnit = 'point']) {
  // ignore: unnecessary_null_comparison
  if (_stateProperties != null) {
    final CrosshairBehaviorRenderer crosshairBehaviorRenderer =
        _stateProperties.crosshairBehaviorRenderer;
    final CrosshairRenderingDetails renderingDetails =
        CrosshairHelper.getRenderingDetails(crosshairBehaviorRenderer);
    renderingDetails.internalShow(x, y, coordinateUnit);
  }
}