Jump to content
  • How to use Miniature Visualization Action Scripts using IronPython in Spotfire®


    How to to use the Spotfire Miniature Visualization action scripts.

    Introduction

    How to use the Spotfire Miniature Visualization action scripts.

     

    Setup an on-click action event on one of the Graphical Table plots.

    1. Go to plot properties and 'Axes' menu.

    2. Add a column and choose the 'Actions' menu.

    3. Check the 'Perform action on click' box and choose 'Settings...'.

    4. Add a new Spotfire script.

    Using the script context:

    When writing the script code, the user has access to a special script context, the context area accessed through the "Context" class handle. This is not usable in debug mode, because it is not assigned until the user clicks the visual. To help with debugging, we use a Document Property in a Text Area to visualize the values in runtime.

    Code Sample

    # Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license.
    # This will get the value in the clicked cell.
    val = Context.Value
    # Get the values in the same row as the clicked value by accessing the list
    val = Context.HierarchyPathValues[0]
    # To get the MiniatureVisualization object that was clicked
    vis = Context.Visualization
     

     

    References

    License:    TIBCO BSD-Style License

     

    Back to IronPyton Scripting in TIBCO Spotfire Examples:  https://community.spotfire.com/s/article/IronPython-Scripting-in-TIBCO-Spotfire


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...