Add dashboard chart period select button using javascript