close #15. criteria function uses service to determine interval colors