screenToGraph property
Converts a screen coordinate point to graph coordinates.
Required for position clamping when getElementPosition is provided. This is used to convert the inner bounds (viewport minus edge padding) from screen coordinates to graph coordinates.
Example:
screenToGraph: (screenPoint) => controller.viewport.toGraph(screenPoint),
Implementation
final Offset Function(Offset screenPoint)? screenToGraph;