toDataCoords method

List toDataCoords([
  1. num? x,
  2. num? y,
  3. num? axis
])

Convert from canvas/div coords to data coordinates. If specified, do this conversion for the coordinate system of a particular axis. Uses the first axis by default. Returns a two-element array: X, Y.

Note: use toDataXCoord instead of toDataCoords(x, null) and use toDataYCoord instead of toDataCoords(null, y, axis).

Implementation

external List toDataCoords([num? x, num? y, num? axis]);