get intervals for graph