Refactored so that it doesn't show you a chart for pages that aren't in a list