getX method

double getX(
  1. int position
)

Get x coordinate based on index

  • mPointWidth / 2 to prevent the first and last K-line from displaying incorrectly @param position index value

Implementation

double getX(int position) => position * mPointWidth + mPointWidth / 2;