Labels

These IronPython scripts below show how to modify any of the Combination Chart visualization settings found on the Labels tab of the Combination Chart 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 Combination Chart Labels Tab Options:

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

  1. Show labels for all, marked rows, or none
  2. Show (or hide) bar labels
  3. Use horizontal or vertical label orientation
  4. Show (or hide) line marker labels
  5. Set max number of labels
from Spotfire.Dxp.Application.Visuals import *

myVis = myVis.As[Visualization]()

# 1. Show labels for all, marked rows, or none
myVis.LabelVisibility = LabelVisibility.All
# OR
myVis.LabelVisibility = LabelVisibility.Marked
# OR
myVis.LabelVisibility = LabelVisibility.None

# 2. Show (or hide) bar labels
myVis.Bars.LabelCompleteBar = True

# 3. Use horizontal or vertical label orientation
myVis.Bars.LabelOrientation = LabelOrientation.Horizontal
# OR
myVis.Bars.LabelOrientation = LabelOrientation.Vertical

# 4. Show (or hide) line marker labels
myVis.Lines.ShowMarkerLabels = True

# 5. Set max number of labels
myVis.MaxNumberOfLabels = 50  #Any integer from 0 to 200 is allowed
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!