Jump to content
  • How to Mark a Visualization based on the unmarked rows in another Visualization in Spotfire® Using IronPython Scripting


    Below is a sample script which help to mark a visualization based on the unmarked rows in another visualization

    Introduction

    Below is a sample script which help to mark a visualization based on the unmarked rows in another visualization

    Code Sample

    # Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license.
    
    from Spotfire.Dxp.Data import *
    from Spotfire.Dxp.Application.Visuals import *
    
    dataTable=Document.Data.Tables["table1import"]
    destDataTable=Document.Data.Tables["table2import"]
    tablePlot=vis.As[TablePlot]()
    baseRows=tablePlot.Data.MarkingReference.GetSelection(dataTable)
    baseIndexSet=baseRows.AsIndexSet()
    print baseIndexSet.Count
    #create a clone of readonly index set
    setIndexSet=baseIndexSet.AsWritable().Not()
    print setIndexSet.Count
    
    #Set the above marking to the new vis
    destTablePlot=vis2.As[TablePlot]()
    marking=destTablePlot.Data.MarkingReference
    rowSelection=RowSelection(setIndexSet)
    marking.SetSelection(rowSelection,destDataTable)
     

     

    References

     

    License:  TIBCO BSD-Style License

    Back to IronPython Scripting in Spotfire® Examples


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...