test

Warning when upgrading to Spotfire 10

TIBCO has deprecated the JQueryUI Javascript library in the latest Spotfire 10.0 release

TIBCO Community pages show us how to use JQuery properly

Change Cross Table properties

#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[1]=150

#Resize cells
crossTable.CellWidth=100

#Change sorting
categoryKey = CategoryKey("cellValueColumnToSort") 
crossTable.SortRowsCategory = categoryKey 
crossTable.SortColumnsOrder = SortOrder.Descending

See CrossTablePlot Members


1 comment:

Mohanvel Rajendran said...

Hi,

I have applied the same script below where i need to sort column "RefrenceDate_Month" but it is not getting sorted

#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[1]=150

#Resize cells
crossTable.CellWidth=100

#Change sorting
categoryKey = CategoryKey("RefrenceDate_Month")
crossTable.SortRowsCategory = categoryKey
crossTable.SortColumnsOrder = SortOrder.Descending