fix bug when updates charts

now use update and delete funcionts of chartjs