add x for a line coordinate in canvas