why are you so determined on using the button
If you use the button then you cannot have a table.
@yosiasz , hahaha, is not my call, is what my Manager’s wants, and you know… 
not really I do not know
cause my manager trusts me when I tell him it cannot and wont work. well current manager that is.
Here is one way but you still stuck cause it does not generate table.
I think apache echart is the way to go.