In Chart properties, under the layout tab you will see show section which has 2 choices Always and conditional.
Conditional show works to show chart only when the given condition is satisfied.
When you want to do it with a button then the easiest way will be to make a variable say v_test give it a default value of 0.
in the Show section (under the layout) of tha chart put condition if(v_test = 1,1,0)
Create a button then in button properties, go to the action tab and click on add button.
Select external as action type and set variable as action.
in variable name, give the name of the created variable e.g v_test and in value put condition as if(v_test = 0,1,0)
So, if your table is hidden clicking on button will show it and if it is shown than clicking on button will hide it.
Since, it will be toggling of the value of the variable between 1 and 0 which in turn will affect your layout show condition of the chart.
The same way you can change text of your button between show table and hide table.
Hope this helps. Let me know if any query.