Cheryl Krueger Posted January 26, 2019 Share Posted January 26, 2019 We have a cross table where the vertical axis isbased upon a property control. The property control is a list of 6 columns. We will be selecting one to four columns to set the property control. This all works great! Now we want to change the width of these columns selected for the vertical axis to be around 160 pts. The default seems to be around 60 pts. I have an iron python script to change the width of the columns, but I get an error if I try to set the width for more "Row Headers" than what was selected in the property control. My question is - How do I determine how many columns were selected in the property control or how many row headers are now in the visualization . Below is my script to change the headers. I would like to loop through the index based upon the number of columns selected in the property control. We are on Spotfire 7.5. ------- from Spotfire.Dxp.Application.Visuals import CrossTablePlot crossTable = viz.As[CrossTablePlot]() crossTable.RowHeaderWidths[0]=160 crossTable.RowHeaderWidths[1]=160 crossTable.RowHeaderWidths[2]= 160 ----- Link to comment Share on other sites More sharing options...
Angad Sodhi 2 Posted January 28, 2019 Share Posted January 28, 2019 Assuming the control is a multi-select list box, you could use this: mlistb = Document.Properties['test'] print len(mlistb) A multi-select list box is interpreted as a Python object of type List. Hence the python function for calculating length of Lists works here Link to comment Share on other sites More sharing options...
Cheryl Krueger Posted January 29, 2019 Author Share Posted January 29, 2019 Thank you! This is exactlywhat I needed. Link to comment Share on other sites More sharing options...
Deepak J Posted November 3, 2019 Share Posted November 3, 2019 Is there a solution for this Or is there a way to set the crossTable.RowHeaderWidths[1] to default/automatic 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