applications – Change layout onclick button

i have one fragment and two button within, btn1 , btn2
if click btn1 i want to show one chart and if click btn2 i want to show one table with same data as Chart

what is your opinion to do this?