aggregation for errors and js chart wire up