Geometrical characterization of non-Markovianity