Skip to Main Content
Spotfire Ideas Portal

read the auto scale function through the API

The ScaleAxisBase.Range currently returns a null value if auto scale is on. I would like to read the auto scale function so i can give multiple graphs the same scale. This especially handy for data where you can not up front deterimene the scale or where range varies a lot over your filter selection.  

  • Attach files
      Drop here to upload
    • Guest
      Reply
      |
      Oct 12, 2021

      One of my customers is asking for this API too.


      That is, using IronPython to read the min range and max range, exactly the same values as clicking button "Set to Current Range" on Y Axis/Value Axis property page.


      In Spotfire 7.11, we can read the min and max range by temporarily set manul zoom to true, however it doesn't work in 10.10 any more.


      from Spotfire.Dxp.Application.Visuals import *

      v=vis.As[BarChart]()

      v.YAxis.ManualZoom=True

      print v.YAxis.ZoomRange

      v.YAxis.ManualZoom=False


      #result is AxisRange[Low=0, High=43133311]




      Thanks.