Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Categories API
Created by Guest
Created on May 16, 2019

Get filtered data from Javascript api

Need to be able to get list of data values when data has been filtered in a visualization, as can be done when values are marked. 

The requirement for this results from using a Spotfire visualization with another application: 

  1. The user is displaying two applications side by side with related sources of data (a common key or filter value), containing even values from 2 to 100 (2, 4, 6, . . . , 98, 100).
  2. The user applies a filter on the Spotfire visualization to only display values 80-94 (80, 82, . . .  92, 94).
  3. There needs to be a way to obtain the values in the Spotfire visualization using the javascript api to pass them to the other application.

This call needs be be able to be done externally from Spotfire, meaning the javascript api makes a call and gets the values back. The result of this call would be similar to using the c# api to get filtered rows and then get unique values of a column from those rows.

  • Attach files
  • Guest
    Reply
    |
    Jun 5, 2019
    The problem here is that when you get the FilterColumn, it does not return the filtered values, it returns the values that are selected in the filter element in the filter panel. Selected means something different for each filter type, so selected for a checkbox means checked, listbox is actually just selected, range is the low and high value...etc.
     
    The issue here is as below.
     
    I have a data set with two columns:
    ColA     ColB
    1            G
    2            H
    3            J
     
    ColA has a listbox filter and ColB has a checkbox filter. When I filter ColA interactively to [1], then the data for ColB is filtered to [G].
     
    I don't need the value of ColA, I need the filtered values of ColB. When I use the FilterColumn values, I will get back [G, H, I] because they are all still checked. The data is filtered to only show G in the visuals, but G, H and J are actually checked in the filter panel. 
     
    What we need is to be able to get the filtered values of any column after filtering is done in Spotfire. Right now, the FilterColumn approach would work only if we need the filtered values for the specific column that has been interactively filtered.
  • Admin