ScaleAxisBase.ZoomRange property does not return indexes when using default range

ScaleAxisBase.ZoomRange property does not return indexes when using default range

book

Article ID: KB0076192

calendar_today

Updated On:

Products Versions
Spotfire Analyst 7.13 and higher

Description

Starting from Spotfire 7.13, When the zoom slider is set to the default range and you try to read the ScaleAxisBase.ZoomRange property the AxisRange.High, AxisRange.Low values are returned as 'None' while in earlier versions it would return the AxisRange.High and AxisRange.Low Indexes as seen in the below example,
User-added image

Issue/Introduction

This article provides details in regards to the change in behavior for the ZoomRange property

Resolution

In 7.13, the zooming behavior of the Zoom Slider has changed and some improvements like auto adjusting the slider based on the current data set were made.  When the slider is pulled to the end values,zooming is turned off and no value is stored

A workaround to set the AxisRange.High and AxisRange.Low values would be to understand how the indexes used by the zoom slider are computed. Consider a data set with dates ranging between Jan 2010 - Dec 2013. When you apply the BinByDateTime method it will generate a hierarchy and each node is assigned an index. As seen below,
User-added image
In this case the years (2010, 2011, 2012) will be assigned index 0-2, then at the next level there are 12 nodes/months per year which gives the indexes 3-38. This is the range in which the zooming is expressed. Based on this you can calculate the high/low values of the zoom range and set it when needed.

Additional Information

Doc: ScaleAxisBase class