I am trying to implement Line chart, from API I am getting response in sequence but on Line Chart
its not plotting in sequence.
Your data isn't sorted in timestamp ascending order as documented here. Sorting your data will fix the problem.
chart.data = data.sort((lhs,rhs) => {
return (new Date(rhs.endDate)) - (new Date(lhs.endDate));
});