lineType property

CrosshairLineType lineType
final

Type of crosshair line. By default, both vertical and horizontal lines will be displayed. You can change this by specifying values to this property.

Defaults to CrosshairLineType.both

Also refer CrosshairLineType

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
          crosshairBehavior: CrosshairBehavior(
                enable: true, lineType: CrosshairLineType.horizontal),
       ));
}

Implementation

final CrosshairLineType lineType