year array works in x axis before creating chart