Appearance

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

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

  1. Set line width
  2. Set transparency
  3. Show (or hide) markers
  4. Set marker size
  5. Draw as step lines option
  6. Break lines on empty values option
  7. Use separate color for marked items option
  8. Compensate for missing values option
from Spotfire.Dxp.Application.Visuals import *

myVis = myVis.As[Visualization]()

# 1. Set line width:
myVis.LineWidth = 3  #Width in pixels (1-10)

# 2. Set transparency:
myVis.Transparency = 0.5  #50% transparency (0.0 - 1.0)

# 3. Show (or hide) markers:
myVis.ShowMarkers = True

# 4. Set marker size:
myVis.MarkerSize = 20  #Size in pixels (1-100)

# 5. Draw as step lines:
myVis.SteppedLines = True

# 6. Break lines on empty values:
myVis.BreakOnEmpty = True

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

# 8. Compensate for missing values:
myVis.CompensateForMissingTimeSeriesValues = True
Welcome!

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