#gt is a graphical table vis script parameter
from Spotfire.Dxp.Application.Visuals.Miniatures import GraphicalTable
graphicalTable = gt.As[GraphicalTable]()
#toggle height between 100 and 300
graphicalTable.HeaderColumnWidth = 100 if graphicalTable.HeaderColumnWidth==300 else 300
#ct is a cross table vis script param
from Spotfire.Dxp.Application.Visuals import CrossTablePlotcrossTable = ct.As[CrossTablePlot]()
#toggle height between 100 and 300
crossTable.RowHeaderWidths[0]=100 if crossTable.RowHeaderWidths[0]==300 else 300
*Not sure how to change the width, but works if you make sure to wrap text header and change its height.
#dt is a table vis script param
from Spotfire.Dxp.Application.Visuals import TablePlottablePlot = tp.As[TablePlot]()
tablePlot.WrapHeaderText = True
#toggle height between 1 and 2
tablePlot.HeaderHeight = 1 if tablePlot.HeaderHeight==2 else 2
2 comments:
how to show/hide some of columns from table visualization
Hello King, One way is to use the TableColumCollection from the TablePlot.TableColumns property to clear and then add those columns you are interested to see.
Check out this post*
https://spotfired.blogspot.com/2015/08/create-tableplot-and-add-columns.html
Post a Comment