Fixed mouse coordinates bug and got graph working