Move appending xgridLines down in the document order to prevent being behind ygrids in the z-index.