item visualization code should be more tolerant of empty datasets