The following is a sample script showing how to reset x-axis Zoom Slider manually.
Introduction
When the Zoom Slider is enabled for X-Axis, and the "Remember Personalized view for each user" is enabled, the Slider may be zoomed in unintentionally since it remembers the last Zoom setting. The next time, those values are no longer valid. Alternately, if the underlying data in the visualization changes, the prior Zoom Slider setting may no longer be relevant. To counter this, you can write a script that resets the Zoom Slider and have that execute when needed. For example, every time you open the report, on filtering/marking change.
The following is a sample script showing how to reset x-axis Zoom Slider manually.
Code Sample
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. ################################################ # This script expects one argument: # visual - The visual (Line chart) which needs X-axis zoom reset from Spotfire.Dxp.Application.Visuals import VisualContent vc = vis.As[VisualContent]() #Following 2 lines will reset the zoom slider vc.XAxis.ManualZoom = False vc.XAxis.ManualZoom = True ################################################
References
License: TIBCO BSD-Style License
Recommended Comments
There are no comments to display.