Refactor charting predicates into own structure