Jump to content

Funny Cat

Members
  • Posts

    30
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Funny Cat's Achievements

Contributor

Contributor (5/14)

  • Reacting Well Rare
  • Dedicated Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

1

Reputation

2

Community Answers

  1. Hi @barchiel33, right, that would be a way for using the input field (multiple lines). For my use case, I don't see the advantage though. It must be clear for the user in which order they have to enter the 3 parameters, so the dropdowns are a good possibility. Additionally, they can search in the dropdown for possible values when they start typing and since they can select only predefined values, there's no need to avoid typos. Thank you very much though!
  2. Hi barchiel33, thank you very much. I also think I've got the best solution already. The data type string list is not allowed for input field (multiple lines). The only option would be a List box (multiple select), but anyway at a later stage I need to know which selection is which, so I need to have the 3 separate parameters. Regarding replacing on-demand settings. That's a pitty. For another use case than the previous one I wanted to make a user selection with the below options. Since I can't change the on demand settings with ironpython I need to use a range and two properties (property1 and property2) which I populate with the ironPython script. One item --> property1 = property2 = user input Multiple items --> not possible since I can't feed string lists into the onDemand range Range --> property1=min(user input), property2=max(user input) Or time span --> property1 = 'A', property2 = 'ZZZZZZZZZZZZZZZZZZ' I can live with that :)
  3. Hi, I wonder if there is a way to load on demand data for multiple document properties. The user populates 3 different properties with dropdowns. Now I want to feed the three properties into the on Demand selection. Is there an expression for that? The only possibility I found is to create another string list property and use this in the on demand. from System.Collections.Generic import List Document.Properties["propList"] = List[object]([Document.Properties["prop1"], Document.Properties["prop2"], Document.Properties["prop3"]]) by the way, is there also a ironPython way to change the on demand input from Range to Values, Expression/Property/Fixed value, etc.?
  4. Hi, I wan't to use two document properties of type date as input for a data on demand range using an Expression. the expression formulas are: If(${cbTimespan}, Date(${fromDate}),DateTimeNow() - Days(${lastXdays})) If(${cbTimespan}, Date(${toDate}),DateTimeNow()) where cbTimespan is a boolean document property fromDate and toDate are date document properties and lastXdays is an integer document property Unfortunately, when I use the properties in the custom expression, the data on demand doesn't return any data. (If I use the properties fromDate and toDate not in the expression, but directly the information link returns data. I tried to debug it using a calculated value in a text field and found, that Date(${fromDate}) results in 01.01.0001 I'm kind of stuck and would appreciate any hints or solutions. Thank you!
  5. Is there a way to export images of visualizations to Excel? Currently in our organization we're using a software for creating a report containing a bunch of electrical parameters and their statistical figures on an excel sheet. Each table row contains a link to another sheet where the corresponding visualizations are shown. The software is no longer maintained so I'm trying to build such kind of report in Spotfire using a cross table. The marking of the cross table row shows the corresponding visualizations. However, it would be great to export the cross table and the visualizations to excel, since also people without Spotfire need to be able to open the report. So is there an iron python way to copy visualization images to Excel? (currently using Spotfire Analyst 12.0.4 LTS) I tried to modify the code in the following link, but I didn't succeed. https://stackoverflow.com/questions/31731159/script-to-export-spotfire-graphic-to-powerpoint
  6. Thank you very much Gaia, that works perfectly!
  7. I'm trying to modify cell values of a data table based on a marking with an IronPython script. from Spotfire.Dxp.Data import * dataTable = Document.Data.Tables["myTable"]cursor = DataValueCursor.CreateFormatted(dataTable.Columns["myColumn"])markings = Document.ActiveMarkingSelectionReference.GetSelection(dataTable) some_string = "some_string" for row in dataTable.GetRows(markings.AsIndexSet(),cursor): cursor.CurrentValue = some_stringHowever, when I want to assign the string to the cursor.CurrentValue, I'm getting AttributeError: can't assign to read-only property CurrentValue of type 'DataColumnValueCursor[str]' Is there a way how to achieve this?
  8. Hello Jose, yes, you understood correctly. That's exactly what I want. Once again with an example: Color axis has a color by, leading to 3 colors on the categorical color axis. group 1: bluegroup 2: redgroup 3: greenif only data points in group 1 are marked, by accessing the row properties I get group 1: blue --> for marked pointsgroup 1: pale blue --> not marked pointsgroup 2: pale red --> not markedgroup 3: pale green --> not markedI cannot get the red and green values from the dataview
  9. Hi, I'm programming a spotfire mod and I want to get the hex color code of the color axis. There's saturated colors when rows are marked and the pale colors, when rows are not marked. I want to get the saturated colors only. I know that one can access the hex color of the individual rows using row.color(), but in case there's no marking on data points from some groups in the color by, I'm getting only the pale colors for those groups. I hope somebody can help.
  10. Hi Fredrik, thanks for your answer. Is it possible to get the code of the original Spotfire Graphical Table visualization, so that I can try to make my own mod? I'm very new to mods development and this would be a great help to start. (And I'd hope I don't have to reinvent the wheel, because what is there is great already) By the way, the idea portal is great, but I guess until I have as many votes together as needed to implement the feature, I'll probably don't need it anymore, have come up with a workaround or switched to another software. So it's not really a option I can count on.
  11. Github just shows a 404 error: https://tibcosoftware.github.io/spotfire-mods/api-docs/
  12. Hi, in a graphical table there's the 4 options for the columns: Sparkline, Calculated value, Icon and Bullet graph. Is there a way to draw histograms into a column of a graphical table? I know that this is not implemented right now. I'm rather thinking about an addon for the graphical table that adds a fifth option. Thanks for any kind of valuable input!
  13. Hi, is there a way to set the the min, max and interval settings of a numerical property control within a text area with an ironpython script?
  14. I couldn't figure out how to access the colorbreakpoints in the heatmap. I ended up with making a heatmap using the scatterplot with tiled markers. In case somebody is interested in the script: from Spotfire.Dxp.Application.Visuals import *from System.Drawing import Colorfrom Spotfire.Dxp.Application.Visuals.ConditionalColoring import Coloring, ContinuousColorRule, ConditionValue, IntervalMode vcMap = visMap.As[VisualContent]() LSL = Document.Properties["LSL"]USL = Document.Properties["USL"] #remove old color rulescolorRule = vcMap.ColorAxis.Coloring.Clear()#create new color rulecr = vcMap.ColorAxis.Coloring.AddContinuousColorRule()cr.IntervalMode = IntervalMode.Gradient #Create ConditionValues with expressions and literalscv0 = ConditionValue.CreateExpression(str(LSL-0.000001))cv1 = ConditionValue.CreateLiteral(LSL)cv2 = ConditionValue.CreateLiteral(LSL+(USL-LSL)*0.1)cv3 = ConditionValue.CreateLiteral(LSL+(USL-LSL)*0.2)cv4 = ConditionValue.CreateLiteral(LSL+(USL-LSL)*0.3)cv5 = ConditionValue.CreateLiteral(LSL+(USL-LSL)*0.4)cv6 = ConditionValue.CreateLiteral(LSL+(USL-LSL)*0.5)cv7 = ConditionValue.CreateLiteral(LSL+(USL-LSL)*0.6)cv8 = ConditionValue.CreateLiteral(LSL+(USL-LSL)*0.7)cv9 = ConditionValue.CreateLiteral(LSL+(USL-LSL)*0.8)cv10 = ConditionValue.CreateLiteral(LSL+(USL-LSL)*0.9)cv11 = ConditionValue.CreateLiteral(USL)cv12 = ConditionValue.CreateExpression(str(USL+0.000001)) #Add breakpointscr.Breakpoints.Add(cv0,Color.FromArgb(170, 170, 170))cr.Breakpoints.Add(cv1,Color.FromArgb(75, 0, 130))cr.Breakpoints.Add(cv2,Color.FromArgb(38, 0, 193))cr.Breakpoints.Add(cv3,Color.FromArgb(0, 0, 255))cr.Breakpoints.Add(cv4,Color.FromArgb(0, 64, 128))cr.Breakpoints.Add(cv5,Color.FromArgb(12, 105, 12))cr.Breakpoints.Add(cv6,Color.FromArgb(128, 192, 0))cr.Breakpoints.Add(cv7,Color.FromArgb(255, 255, 0))cr.Breakpoints.Add(cv8,Color.FromArgb(255, 210, 0))cr.Breakpoints.Add(cv9,Color.FromArgb(255, 165, 0))cr.Breakpoints.Add(cv10,Color.FromArgb(255, 83, 0))cr.Breakpoints.Add(cv11,Color.FromArgb(255, 0, 0))cr.Breakpoints.Add(cv12,Color.FromArgb(35, 35, 35)) #Set manual display name for the two expressionsfor coloring in vcMap.ColorAxis.Coloring: for breakpoint in coloring.Breakpoints: if breakpoint.Value.Value == str(USL+0.000001): breakpoint.ManualDisplayName = 'higher' if breakpoint.Value.Value == str(LSL-0.000001): breakpoint.ManualDisplayName = 'lower'
  15. Hi Gaia, thanks for the input. "I think your problem in visualization terms are the strong outliers." Indeed, that's what I figured. "However, the Marking subsets seem to ignore filtering. So I cannot filter them out and use the marking to subset." Wouldn't you call that a bug? In my opinion, the data should be limited to what is set in the Data section of the chart settings. Marking and filtering should always be the base for which data appears in the subsets. Do you agree? In case I have to filter the outliers I'm thinking about an easy solution: calculating the outlier columnMaking another dataset from a linked copy to my previous datasetFilter the outliers with a "Filter rows" transformation.Use the new dataset as inputCreate the Marking/Not in Marking subsets.--> works just fine
×
×
  • Create New...