Updated chart handlers to use the dates sent from the chart script.