improve: clear chart every time there is a change