working both button layout and chart selector