add comparator charting and refactor to reuse charting stuff a bit better