from Spotfire.Dxp.Application.Visuals import BarChart
barChart = vis.As[BarChart]()
#get filter rules
gotFilerRules,filterRuleCollection = barChart.TryGetFilterRules()
#delete all filter rules
if gotFilerRules:
for filterRule in filterRuleCollection:
filterRuleCollection.Remove(filterRule)
#print filterRule.DisplayName, filterRule.Expression
#add a filter rule collection to show top 5 axis values
#filterRuleCollection.AddTopNRule("THEN [Y.FinalValue]",5,True)
No comments:
Post a Comment