Jump to content

Per Kurcman

Members
  • Posts

    4
  • Joined

  • Last visited

Per Kurcman's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post

Recent Badges

0

Reputation

  1. Shandilyas example sometimes failsin 10.0.0 and later versions of Spotfire. I'm attaching a modifiedexample where aMutationObserver is added, listening to two calculated values, and set the value and color of the gaugedepending on those two calculated values.
  2. This has been seen when using older files in 10.3 When the data table is embedded, the data canvas has the option "Always new data" selected which is why we see the error: "Schema refresh will not update data table When you have just a single data table which is embedded, and when you get into data canvas it will show it as "Stored Data". However, this may change when the primary data table is linked, although the secondary data table is embedded. In the case of the latter, you will see the option "Always new data" and the message "Schema refresh will not update data table," which implies that the second data table is embedded. - Once you changed the Data Loading option to "Stored Data", you won't see the error anymore.
  3. Hi, I do run the script from the script editor, then you will get the errors created by the script. I pasted your script in adefault report of Analyst, and then executed it from the Script editor, and just corrected the few errors I got. Below is the script I got working, saving to my desktop, and adding the script parameter 'visual' pointing to one of the visualizations. BR, Per K import System import clr clr.AddReference("System.Windows.Forms") from System import * from System.IO import * from System.Drawing import Bitmap, Rectangle from System.Drawing import Graphics, Image from Spotfire.Dxp.Framework.ApplicationModel import ApplicationThread from System.IO import Path from System.Windows.Forms import FolderBrowserDialog,MessageBox #Choose Folder to save visualization filename="" folder=FolderBrowserDialog() result=folder.ShowDialog() if result==result.OK: filename=folder.SelectedPath else: MessageBox.Show("Please select a folder and try again") app = Application.GetService(ApplicationThread) image = Bitmap(800, 600) def f(visual, document, app, image, Graphics, Rectangle): try: vis = visual gfx = Graphics.FromImage(image) rect = Rectangle(0,0,image.Width,image.Height) vis.Render(gfx, Rectangle(0,0,image.Width,image.Height)) imageFilename = filename + "image.png" except: return # DO SOMETHING WITH THE IMAGE HERE image.Save(imageFilename) app.InvokeAsynchronously(f(visual, Document, app, image, Graphics, Rectangle))
  4. This is not a limitation of JSViz, its a limitation of the public API (Used by JSViz). It's not possible to use external data and make a Custom Visual Extension. (At least not in versions up to Spotfire version 10.0)
×
×
  • Create New...