(fix) only displays bar graph after three categories are retrieved.

(fix) only displays bar graph after three categories are retrieved.