Drop-down list to control table plot visualization sort order

I'd like to use a drop-down list of column names to control sorting for a table visualization. Some column choices require ascending order, while others require descending order. Thus, I need to add a conditional statement to change sort order depending on my drop-down selection. I've pieced together the following bit of code, which does the sorting part by drop-down list selection. However, I'm stuck on finding the correct API call for specifying ascending/descending order. I'm currently using Spotfire v7.8.

from Spotfire.Dxp.Application.Visuals import TablePlot

Cols=[Document.Properties["TablePlotSortBy"]]

tablePlot.As[TablePlot]().SortedColumns.Clear()
tablePlot.As[TablePlot]().SortedColumns.AddRange(Cols)

 

(1) Answer

Login