Jump to content

how to fix the Column width in Cross table when we have a hierarchy-slider as an axis.


deepu Shrestha

Recommended Posts

  • 1 year later...
  • 1 year later...
  • 1 year later...

I had the same problem. Here are the steps I took to fix the problem:

a) I set up a dropdown property control (Hier) with fixed values (0,1,2) to assign the levels of my hierarchy

b) Modified the custom expression on the visualization axis to use the property Control (Hier)

c) Added an action to Execute the following script when the property control changes:

#ct is a cross table vis script param

#Period is a script parameter with a value pointing to the (Hier) property control value

from Spotfire.Dxp.Application.Visuals import CrossTablePlot

crossTable = ct.As[CrossTablePlot]()

#in my case I had Year, Qtr,Month ... set the width of the selected level to be fixed

#set the rowHeaderWidth for the next description columns higher

crossTable.RowHeaderWidths[Period]=80

crossTable.RowHeaderWidths[Period + 1]=300

 

Hope this helps!

Gerald Emesih

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...