Get x coordinate based on index
double getX(int position) => position * mPointWidth + mPointWidth / 2;