getAbsoluteIndexFromScreenX method

double getAbsoluteIndexFromScreenX (int x)

This polyline displays a given range of a data array. x must be given in pixels relative to dataArea's origin. Then this function returns an absolute index between 0 and npointsInDisplayRegion (of the original uncompressed array).

Implementation

double getAbsoluteIndexFromScreenX(int x) {
  double relIx;
  double absIx;

  relIx = getRelativeIndexFromScreenX(x);
  absIx = relIx + cpd.uIndices[0];

  return absIx;
}