Spotfire custom tool




















There is only one instance of a tool. The instance receives a handle to its context from the context argument of the Execute method invoking it. Tools are stateless. A state can only be saved in the document from an instance of a class that is derived from DocumentNode and attached to the Document Model. Use the CustomNode class and the Document. CustomNodes property.

Tools perform an action. Usually, the action ought to result in one undo state on the undo stack. Therefore all tools that change the state of the document should wrap their action in a Transaction. The Page context is not available for the web client. There are also sub contexts for visual tools applying to specific visualization types: Visualization: All visualizations, but not the plot area.

BarChart: Only bar charts. BoxPlot: Only box plots. CombinationChart: Only combination charts. CrossTablePlot: Only cross table plots. GraphicalTable: Only graphical table plots. LineChart: Only line charts. MapChart: Only map charts. ScatterPlot: Only scatter plots.

ScatterPlot3D: Only 3D scatter plots. SummaryTable: Only summary tables. TablePlot: Only table plots. TextArea: Only text areas. WaterfallChart: Only waterfall charts.

Depending on the content of the right-clicked cell, and without any added extensions, the sub menu title contains one or more of the following entries: Value: Available when the clicked cell contains text.

The text is placed on the clipboard. Link: Available when a column renderer has supplied a link for the clicked cell.

Image: Available when a renderer has supplied an image for the clicked cell. The image placed on the clipboard is identical to the one seen in the table. Map Chart Coordinates Context 7. The most common scenario is to turn data values into images, which are rendered in the table cells. A data function is like a swiss-army-knife component when building applications in Spotfire.

Data functions are similar to data sources, but are able to compute over multiple inputs from the document and output data to multiple places in the document. The transformations framework adds a layer between data reading and the creating of a data table, providing the means to modify the data before it is imported.

A data transformation applies a rule or a function to the retrieved data to prepare it for analysis. With custom expression functions, it is possible to extend the expression language used in custom expressions and calculated columns. A custom expression function is ether row-based, column-based or an aggregation method. Note: it is possible to call TIBCO Enterprise Runtime for R directly from the Spotfire Expression Language , without having to create a custom expression function or employ data functions The simplest way to enhance your analysis with R scripts.

Curve fitting is the process of calculating values from visualization coordinates and input parameters, to draw reference curves and points. Preferences Objects, also known as Configuration Sets, are collections of application attributes that can be shared by users and groups of users. Read more in the Licensiing Extensions section below.

A compiled project can be packaged into a Spotfire package for distribution and deployment to a Spotfire server. ExecuteCore : Contains the implementation. WriteLine Resources. Title ; writer. ToString ; writer.

The boundary of each visual is calculated and a container DIV is added and positioned according to the calculated boundary: oreach Visual visual in page. GetVisualBounds visual, visualizationAreaBounds ; writer. Top, bounds. Left, bounds. Width, bounds. WriteLine textArea. Save stream, ImageFormat. Render graphics, new Rectangle Point. Empty, bitmap. RegisterTools registrar ; registrar.

Haven't found what you are looking for? Ask a Question. The RenderCore method performs the drawing. The GetRenderTriggerCore returns a trigger that fires whenever the visualization shall be redrawn. The following sample shows a minimal visualization. It has two properties, representing a data table and a marking. When asked to render itself, it just draws a string specifying the number of marked rows in the data table.

In order for a visualization to be creatable, a custom factory must be specified for it. The factory is responsible for creation and initial configuration of the visualization. It also holds some metadata, such as an image to use for UI commands and a type identifier.

The visualization factory is derived from CustomVisualFactory. Note that the custom factory class does not actually instantiate the visualization. It is the factory base class that instantiates the visualization through the parameterless constructor of the visualization.

The constructor does not have to be public; in fact, it should not be public, since there is no way for an API user to create a visualization and then insert it into the document. When the visualization has been created and inserted into the document node hierarchy, the framework calls two virtual methods on the factory: InitializeCore , which sets properties that are not directly related o data, and AutoConfigureCore , which configures the visualization with appropriate default values for data related properties, such as the data table, marking and columns to use.

In the example above, only the AutoConfigureCore method overridden. Finally, the visualization factory must be registered with the framework. This is performed from the RegisterVisualsoverride in the add-in. It will also be able o take part in printing and export scenarios. There is, however, no way to configure the visualization or interact with it in any way. In order to do that, a view must be created for the visualization.

If you want any previously created custom visualizations to work with the new API, they need to be converted. In the AddIn class the view is registered in the RegisterViews method, for example:. An intance of CustomVisualView can be seen as an embedded web server that typically provides an html file, together with some resources such as JavaScript files, images, etc.

To initialize the visualization, override the GetResourceCore method:. That request will be routed to call the above method GetResourceCore.



0コメント

  • 1000 / 1000