We are able to configure/create a Graphical table programmatically, but not associate a script on the icon click.
There is no API to invoke another script on the icon click.
https://community.tibco.com/wiki/remove-all-columns-graphical-table-add-sparkline-column-and-icon-column-tibco-spotfirer-using