#vis and dataTable are script parameters.
from
Spotfire.Dxp.Application.Visuals import ScatterPlot
from Spotfire.Dxp.Data import RowSelection
v1
= vis.As[ScatterPlot]()
from
Spotfire.Dxp.Data import RowSelection, IndexSet
#prepare to unmark all rows
rowSelection
= RowSelection(IndexSet(dataTable.RowCount,False))
#set visualization data table marking based on rowSelection
v1.Data.MarkingReference.SetSelection(rowSelection,dataTable)
#clears marking from a given table
def clearMarkings(aDataTable):
from Spotfire.Dxp.Data import RowSelection, IndexSet, DataManager
dataManager = Application.GetService(DataManager)
for marking in dataManager.Markings:
rowSelection = RowSelection(IndexSet(aDataTable.RowCount,False))
marking.SetSelection(rowSelection,aDataTable)
#clear marking from all tables
for dataTable in Document.Data.Tables: clearMarkings(dataTable)
Method 2: Clears marking form a given table
#clears marking from a given table
def clearMarkings(aDataTable):
from Spotfire.Dxp.Data import RowSelection, IndexSet, DataManager
dataManager = Application.GetService(DataManager)
for marking in dataManager.Markings:
rowSelection = RowSelection(IndexSet(aDataTable.RowCount,False))
marking.SetSelection(rowSelection,aDataTable)
#clear marking from all tables
for dataTable in Document.Data.Tables: clearMarkings(dataTable)
No comments:
Post a Comment