Friday, October 13, 2017

Spotfire - Reset Zoom Sliders by looping through visuals and checking each visual type (Ironpython)

#Reset zoom sliders
from Spotfire.Dxp.Application.Visuals import * 

#1 Loops through visuals
for vis in Application.Document.ActivePageReference.Visuals: 

  #1.1 check each visual type
  if vis.TypeId==VisualTypeIdentifiers.BarChart:

    #1.2 Reset zoom sliders
    vis.As[VisualContent]().XAxis.ZoomRange=AxisRange.DefaultRange

No comments:

Post a Comment