These IronPython scripts below show how to modify any of the Line Chart visualization settings found on the Labels tab of the Line Chart Properties dialog box in the Spotfire user interface.


Change Line 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 line identifier labels option
  2. Show individual values labels option
  3. Show labels for all, marked rows, or none
  4. Set max number of labels shown
from Spotfire.Dxp.Application.Visuals import *

myVis = myVis.As[Visualization]()

# 1. Show line identifier labels
myVis.ShowLineLabels = True

# 2. Show individual values labels
myVis.ShowMarkerLabels = True

# 3. Select an option in the "Show labels for" radio button group
myVis.LabelVisibility = LabelVisibility.All
# OR
myVis.LabelVisibility = LabelVisibility.Marked
# OR
myVis.LabelVisibility = LabelVisibility.None

# 4. Set the max number of labels
myVis.MaxNumberOfLabels = 50  #Any integer from 0 to 200 is allowed

