consolidated graph functions and added stackedAreaChart