Introduction
In Spotfire® you can read the Visualization Area Size of a users Spotfire session. The visualization area size is mainly governed by the users screen size. Sometimes this is useful in order to present the best view for a user given the size of his/her screen.
As an example a script could read the visualization area size and then change the page to a page that fits the screen size of the users device. This way you can optimzie the experience of a Spotfire analysis file for the device type used to view it.
This script below shows how to read the size and store the Width and Height in document properties.
A DXP file showing this is attached to this article.
Code sample
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. visualizationAreaSize=Document.ActivePageReference.GetVisualizationAreaSize() Document.Properties["VizAreaSizeWidth"] = visualizationAreaSize.Width Document.Properties["VizAreaSizeHeight"] = visualizationAreaSize.Heig
References
License: TIBCO BSD-Style License
Attachment
Download attachment from resources
visualizationareasizereader.zip
Recommended Comments
There are no comments to display.