This sample code illustrates how to access and perform opertations on visualization Tooltips
Introduction
This sample code illustrates how to access and perform operations on visualization Tooltips
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. from Spotfire.Dxp.Application.Visuals import BarChart vis1=viz2.As[BarChart]() print (vis1.Title) #Get the count of ToolTips print "Total Tooltips available for viz -" + vis1.Title + " are- " +str(vis1.Details.Items.Count) #Loop through all the Tooltips for i in vis1.Details.Items: print "ToolTip - " + i.DisplayName + " is -" + str(i.Visible) #hide/unhide tooltip if i.DisplayName == 'Tip1': i.Visible=False else: i.Visible=True #Add a new Tooltip called SalesAvg vis1.Details.Items.AddExpression("Avg([Sales]) as SalesAvg") #Change the order of the Tooltip vis1.Details.Items.Move(0,1)
References
License: TIBCO BSD-Style License
Recommended Comments
There are no comments to display.