Introduction
The Custom Panel extension was updated with a web-based view in Spotfire® version 7.7, making it possible to use custom panels in the Spotfire web client (Consumer/BusinessAuthor). Unlike Spotfire Analyst, custom panels will not show up in the toolbar (or menu), in the web client (in Spotfire Analyst each custom panel will have a toggle button in the toolbar), so there is no way for the user to toggle them on or off. If a custom panel should be visible in the web client is decided by the author when the analysis is created with Spotfire Analyst. Since every panel has a close button (see image below) that cannot be disabled, a user may accidentally turn off a custom panel and not be able to turn it on again,
A way to work around this issue is to enable a "show panel" function using the API, The quickest way is to use IronPython script (for example with a action control as illustrated in the image below) but it would also be possible to capture this functionality in a Custom Tool extension (that will show up in the web client menu).
Code sample
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. for panel in Document.ActivePageReference.Panels: if panel.TypeId.Name == "MyNameSpace.MyCustomPanel": panel.Visible = True
Change "MyNameSpace.MyCustomPanel" to the TypeId name of your custom panel.
Tip: to quickly get the TypeId name of your panel you can run the following script:
for panel in Document.ActivePageReference.Panels: print panel.TypeId.Name
References
License: TIBCO BSD-Style License
Recommended Comments
There are no comments to display.