Appearance

These IronPython scripts below show how to modify any of the Cross Table visualization settings found on the Appearance tab of the Cross Table Properties dialog box in the Spotfire user interface.
Note

In each of the scripts below, it is assumed that the MyVis variable references the targeted visualization. See here for more information about referencing visualizations.

Change Cross Table Appearance Tab Options

This IronPython script shows how to change the following options, in order from top to bottom in the user interface:

  1. Show cell borders
  2. Allow table data export in Spotfire web clients
  3. Grand total for columns
  4. Grand total for rows
  5. Display cells with no data as blank or custom text
  6. Use separate color for marked items
  7. Horizontal scrolling options
from Spotfire.Dxp.Application.Visuals import *

myVis = myVis.As[Visualization]()

# 1. Show cell borders
myVis.ShowGridlines = True

# 2. Allow table data export in Spotfire web clients
myVis.ExportDataEnabled = True

# 3. Show grand total for columns
myVis.ShowColumnGrandTotal = True

# 4. Show grand total for rows
myVis.ShowRowGrandTotal = True

# 5. Display cells with no data as:
myVis.EmptyCellText = ""  #Equivalent to selecting "Blank" option
# OR
myVis.EmptyCellText = "Empty"  #"Custom text" option auto-selected

# 6. Use separate color for marked items
myVis.UseSeparateColorForMarkedItems = True

# 7. Set horizontal scrolling behavior:
# Freeze row headers
myVis.RowHeaderScroll = TableHeaderScrollBehavior.Never
# OR
# Scroll row headers
myVis.RowHeaderScroll = TableHeaderScrollBehavior.Always
# OR
# Adjust automatically
myVis.RowHeaderScroll = TableHeaderScrollBehavior.Automatic
Welcome!

The purpose of this website is to provide a comprehensive, accurate, and efficient IronPython reference for Spotfire developers.

If you have any questions, comments, or ideas, feel free to get in touch!