Set property for similar visualizaitons

Example 1. A text area used as a banner/menu was copied across multiple pages, but need to hide the title

#hides the title on all textareas called 'page header' 
from Spotfire.Dxp.Application.Visuals import VisualTypeIdentifiers 
for p in Document.Pages:
for v in p.Visuals:
  #if v.Title == 'Page Header':
if v.TypeId==VisualTypeIdentifiers.HtmlTextArea:
v.ShowTitle=False

Example 2. User wants to see x axis on all CombinationChart visualizations

#shows XAxis on all CombinationChart visuals
from Spotfire.Dxp.Application.Visuals import VisualTypeIdentifiers from Spotfire.Dxp.Application.Visuals import CombinationChart for p in Document.Pages: for v in p.Visuals: if v.TypeId==VisualTypeIdentifiers.CombinationChart: v.As[CombinationChart]().XAxis.ShowAxisSelector = True
Previous
Next Post »