added chart delete function