villain PARK Posted June 4, 2020 Share Posted June 4, 2020 Hi I have a problem of resizing cell width by script the script is in Wiki. Title: How to style the Cross Table Cell Height/Column Header Height in TIBCO Spotfire using IronPython Scripting. By:tdevadka from Spotfire.Dxp.Application.Visuals import CrossTablePlot vis.As[CrossTablePlot]().CellWidth=100 vis.As[CrossTablePlot]().CellHeight=50 vis.As[CrossTablePlot]().RowHeaderWidths.Item[0]=200 vis.As[CrossTablePlot]().ColumnHeaderHeights.Item[0]=40 --------------------------------------------------------------------------------- When I run this script, only Cell width doesn't change, but the others work! I don't understand why. and even, there isno error messege. Please Help me... Link to comment Share on other sites More sharing options...
David Boot-Olazabal Posted June 10, 2020 Share Posted June 10, 2020 Hi pgm7727, Please consider this script. It worked for me (you can find it here: https://spotfired.blogspot.com/2014/03/change-cross-table-properties.html) #Script to change row header, cell widths and row sorting #viz is a Cross Table visualization script parameter from Spotfire.Dxp.Application.Visuals import CrossTablePlot, CategoryKey from Spotfire.Dxp.Data import SortOrder #Get a reference of the cross table from viz param crossTable = viz.As[CrossTablePlot]() #Change the second RowHeader crossTable.RowHeaderWidths[0]=150 #Resize cells crossTable.CellWidth=100 #sort #Change sorting categoryKey = CategoryKey("cellValueColumnToSort") crossTable.SortRowsCategory = categoryKey crossTable.SortColumnsOrder = SortOrder.Descending crossTable.SortRowsOrder = SortOrder.Descending #Reset sorting crossTable.SortRowsCategory = None Kind regards, David Link to comment Share on other sites More sharing options...
villain PARK Posted June 26, 2020 Author Share Posted June 26, 2020 OMG... I dont get it what is different with mine.. anyway It works. great. THANKS A LOT! Link to comment Share on other sites More sharing options...
Priya Singh Posted August 5, 2022 Share Posted August 5, 2022 Hey can you help. I tried this but this does not work if you right click the cross table and select resize columns to fit and then again Run the script. I am just changing the cell Widthvis.As[CrossTablePlot]().CellWidth=100 Link to comment Share on other sites More sharing options...
David Boot-Olazabal Posted August 15, 2022 Share Posted August 15, 2022 Hi Priya,Do you have an example dashboard you can share, in which you have the failing script?I see the script is quite old, so it may need to be tweaked to your current Spotfire version.Kind regards,David Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now