test

Warning when upgrading to Spotfire 10

TIBCO has deprecated the JQueryUI Javascript library in the latest Spotfire 10.0 release

TIBCO Community pages show us how to use JQuery properly

Create a Visualization Programatically

Bar Chart Example

#Creates a BarChart visualization from the default table
from Spotfire.Dxp.Application.Visuals import BarChart

#gets a reference to the default data table
#dataTable = Document.Data.Tables["yourTable"]
dataTable = Document.Data.Tables.DefaultTableReference

#Creates a BarChart 
chart = Application.Document.ActivePageReference.Visuals.AddNew[BarChart]()

#Configure the BarChart 
chart.Data.DataTableReference = myDataTable
chart.Title = "Test Bar Chart1"
chart.XAxis.Expression = "<"+str(dataTable.Columns[1])+">"
chart.YAxis.Expression = "Count(" + str(dataTable.Columns[0]) + ")"
chart.Legend.Visible = False



Table Plot Example

#Creates a TablePlot visualization from the default table
from Spotfire.Dxp.Application.Visuals import TablePlot

#gets a reference to the (default) data table
#dataTable = Document.Data.Tables["yourTable"]
dataTableReference = Document.Data.Tables.DefaultTableReference

#Creates a TablePlot
tablePlot = Application.Document.ActivePageReference.Visuals.AddNew[TablePlot]()

#Configure the TablePlot
tablePlot.Data.DataTableReference = dataTableReference
tablePlot.Title = "${DataTable.DisplayName}"

Duplicate a Visualization
myPage.Visuals.AddDuplicate(vis)  #vis is a script parameter



No comments: