Jump to content

barchiel33

Members
  • Posts

    17
  • Joined

  • Last visited

  • Days Won

    1

barchiel33 last won the day on August 2

barchiel33 had the most liked content!

Recent Profile Visitors

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

barchiel33's Achievements

Apprentice

Apprentice (3/14)

  • Collaborator Rare
  • One Month Later
  • Week One Done
  • Conversation Starter
  • First Post

Recent Badges

7

Reputation

2

Community Answers

  1. Hello Vincent! Like many things in Spotfire, you could accomplish this with JavaScript. The canvas has an element associated with it, you could querySelector it and change it's background style like any other HTML element. If you leave the visuals with a transparent background, you wouldn't need to change them. Not 100% sure on the exact coding you'd have to write, you may need something like a mutation observer in case Spotfire has some looping code to set the canvas or something.
  2. Hello Maureen! I think you might be able to do it via Javascript. In the dev tools, you can see the element corresponding to the column header. I'd imagine you could use a javascript function to find each header you want to add a tooltip to and attach a tooltip that shows on the mouse over event.
  3. Yep, I mentioned that in my post although I called it the wrong thing. I said Canvas Layout when I meant Page Layout.
  4. Yep! This is entirely possible! Basically what you do is rebuild the page layout each time a visual is added or removed. Here's a good starting point: you'll use similar code to this. Basically, iterate through the visuals on the page and add them to the layout in different places based on their names.
  5. The issue is that you're using a table for your layout instead of one of the more responsive layout methodologies. Look into switching to a grid or a flexbox layout. With both of those, you can have either the entire container or each individual element shrink or grow based on the viewport. It also seems like you've changed the canvas layout for this page, otherwise it wouldn't scroll. I would suggest you look into using some other content styling, such as a collapsible accordion, to reduce the necessary height and to also reduce the white space. For example, you could combine first and second columns of your current layout into a single column with an accordion.
  6. I'm willing to bet the issue is the public key token. I suspect that when the script runs on the original, it adds the reference is essentially duplicating the original script dll into a folder either in your computer or in the Spotfire files. Then when you move your report, it tries to repeat that process but it can't make a new copy since the public key token is specified, causing it to error out. Have you tried having someone who has never opened the original template open the copy in its new folder and run the script? Alternatively, if you have the file for the reference you're trying to add, you could add the folder it's contained in to your sys path and then add the dll by file name. If the script runs after doing this, then that would be clear proof to me that it is what I suspected. This would only work as a debug test, since other users wouldn't be able to access the dll file location (unless it's on a network drive or something). But it would help determine the exact cause. import sys import clr sys.path.append('C:\PathToDllFolder') clr.AddReference('MyDll.dll')
  7. You could also use a combination of a Python/TERR data function and your Ironpython script. Have the data function trigger automatically and when setting the input parameters make sure to include the filter scheme you're using. All this function would need to do is output a count of the rows in one of your columns, preferably a unique identifying column. Alternatively, you could have it just output the current system time. Either method should work fine. Then you can have your Ironpython script trigger off that document property. Assuming you go with a TERR function, you could create a data function with one input called input_col and one output called output. input_col would be of type column and allow any data type. output would have the Value type. The script would be: output <- Sys.time() You don't actually need to use the input_col here, it's just there to trigger the function. I think the system time should trigger the document property's change event, even if the data function triggers back to back in quick succession. I'd have to test to be sure, but I think it'd work even at the seconds level so if someone changed the filter and then immediately changed it again, it should still fire the change event.
  8. There should be a way to do this using Javascript. You should be able to target the visualizations container element and set it's position to sticky. Not sure the exact coding though. I believe you'll want to use a query selector for the sf-visual-id attribute, since that value doesn't seem to change (whereas the element's id value does). The part I'm iffy on is getting the position to switch from absolute to sticky and stay on sticky. There might be some javascript that's part of the Spotfire built-in scripting that keeps the position property from changing for whatever reason.
  9. Hi @pratikpathak, so you have a set of transformations and in the titles are basically flags indicating which to apply? Something like FebData_DateFilter_ConvertToHours_FactoryFilter.csv? When do you apply the transformations? Ex. Right when you load the data, later when you merge data, etc. etc. Have you used Ironpython before?
  10. yes, that should be possible although it depends a bit on how you added (or add) the CSVs. I'm not sure the exact code off the top of my head, but you should be able to use Ironpython to iterate over your CSVs (either when using Ironpython to load the CSVs or by iterating over the data sources in the report and checking their type). As you iterate, you can use either an If elif or extract whatever transformation from the file name. Then Ironpython has ways to add/remove/change transformations to data tables. Here are some example scripts that may give you a good starting point:
  11. Ahhh, authentication is tricky within Spotfire. I'm not 100% certain about this, but I believe that Python data functions have an 'issue' with HTTPS (and similar REST/Web requests) in Spotfire. I'm guessing it's probably a security thing or something. You might be able to accomplish what you want via IronPython instead, have you given that a try? I managed to find this script: but I can't vouch for its effectiveness since I haven't tried it before. Could you tell me which library you're trying to use?
  12. I'm thinking you'd have an easier time using a Python data function for what you're trying to do. I would think something like: li = list(search_list.split(', ')) output = text_column.apply(lambda row: all(x in row for x in li)) where search_list is a string document property containing a comma-space separated list of the terms to seach for, text_column is a column from the data table that you want to search for the terms, and output is a column output which will contain true if all terms in search_list are in the corresponding row from the text column and false if any term isn't.
  13. Would you be able to post the actual Python script that you're using? It's difficult to pinpoint what exactly could be going wrong without seeing the code itself. Does it say specifically which module is not being found? There are some packages that require specific steps to get working properly.
  14. Unfortunately that article doesn't work for what I'm trying to do. I have a report with filters already created for every column due to the automatic creation, I want to delete a large number of them. The code shown only removes them from groups within the filter scheme organization.
  15. Hello All, I was wondering if there was a way to delete (not hide or clear) multiple filters for a data table in a report? I know that it's possible to delete individual filters by setting AutoConfigFilter to manual and it's possible to start with no filters by setting the report default to manual, but I can't seem to find a way to remove filters in mass from a report that started as AutoConfigFitler. I've tried some stuff with Ironpython but just ended up crashing Spotfire when I tried removing a FilterCollection from a FilteringScheme. When I tried iterating over the filters in a FilterCollection and using FilterCollection.Remove(filter), it didn't seem to do anything. Thanks in advance!
×
×
  • Create New...