add click event so that if click on palette colors are applied to chart