Search code examples
spotfire

Is it possible to open a spotfire analysis file stored in memory?


I am trying to figure out if there is a way how I can pass a dxp analysis file from memory to the API (i.e. the file is not stored in the library). So the call would be something like that:

<script type="text/javascript">       
      window.onload = function() {
            var customization = new spotfire.webPlayer.Customization();
            customization.showClose = false;

            // can I pass dxp file in memory like that?
            var file = new AnalysisFile();
            var app = new spotfire.webPlayer.Application(htmlRawModelAnalyticsserver,
                customization,
                file);

            var doc = app.openDocument("spotfire-container", htmlRawModelLaunchpage);
        }
</script>

I am using Spotfire version 10.1


Solution

  • based on your last comment I'm going to suggest that you look into the JavaScript API. from the documentation there:

    With the TIBCO Spotfire® JavaScript API it is possible to embed Spotfire visualizations and dashboards into web pages. The API supports customized layout and enables integration with external web applications.

    The JavaScript API can be used for a diverse set of scenarios:

    • Embed Spotfire visualizations into a corporate web site.
    • Open an Spotfire analysis from a link, and configure the data or the analysis depending on the user.
    • Integrate Spotfire analyses with other web applications.

    The JavaScript API supports opening multiple views against the same analysis, where all views are automatically linked together. This gives a lot of flexibility when creating a mashup.