[rrdgraph] Fix only hour graphs being generated, condensed code