Jump to content

Cross Table Column Width is Not Working


Zakir Sharief

Recommended Posts

Hi,

I have a cross table based on the fiscal week and each cell is showing a value with the percentage. The values are not showing completely as the column width is not enough and since i have lot of columns it is gets difficult to manaully set the column width.

I am using the below Iron Python script, to set the column width and i tried using differen scripts. But for some reason none of the scripts works for me. I dont know what is the issue with the script but the column width does not work. I tried using the row height and column height which are working put the column width does not work.

Could you please suggest what would be an issue and how do i resolve it.

Code 1:

from Spotfire.Dxp.Application.Visuals import *

for page in Document.Pages:

for visual in page.Visuals:

visualization = visual.As[Visualization]()

viz = visual.As[CrossTablePlot]()

if visualization != None:

# print "Page Title:" + visual.Title + ", with name:" + visual.Name + ", on page " + page.Title

print "Page Title:" + visual.Title + ", on page " + page.Title

if page.Title=="Repair" and (visual.Title=="Internal/External OTD"):

# print "hello world"

print type(visual)

print Resize

viz.CellWidth = Resize

 

Code 2:

from Spotfire.Dxp.Application.Visuals import *

vc = vc.As[CrossTablePlot]() # Crosstable visualization is the script parameter

print vc.CellWidth

vc.CellWidth=100

Code 3:

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

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

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...