date functions. chart controller chart type still not working