cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
CSkjodt
Level III

Implementing dynamic hierarchical filtering in graph builder with local data filters

Hello JMP Community,

 

I am working on enhancing the functionality of the Graph Builder in a JMP add-in (using JMP Pro 17.2) and require assistance in implementing a dynamic hierarchical filtering feature using local data filters. The solution I am looking for is similar to  https://community.jmp.com/t5/JMP-Add-Ins/Dynamic-Subset-Add-In-Filterable-Data-Table-updated/tac-p/5... but should be in the graph builder interface.

 

Currently, I have two local data filters in my setup:

  • one for Column X (Local Data Filter 1)
  • another for Column Y (Local Data Filter 2)

My objective is to establish a dynamic linkage between these filters. Specifically, when a selection is made in Local Data Filter 1 (Column X), Local Data Filter 2 (Column Y) should automatically update to display only col Y variables that are relevant to the chosen variable in col X i.e in the same row as the col X selection

 

I aim to integrate this feature into a JMP add-in, which will include a straightforward Graph Builder interface accompanied by these two interconnected local data filters. My goal is to expand this functionality to accommodate more than two local data filters in the future, and I therefore seek a generalized solution in JSL form.

 

Could you provide guidance or suggest the best approach to achieve this dynamic filtering interaction? Below is an example illustrating the basic structure of the Graph Builder with the two local data filters for :workflow_id, :id_type, which I want connected:

 

 

// Define table
dt = Data Table( "dtX" );

Graph Builder(
Size( 604, 622 ),
Variables(
X( :cumulative_time_days ),
Y( :var1),
Overlay( :id )
),
Elements( Line( X, Y, Legend( 16 ) ) ),
Local Data Filter(
Add Filter(
columns( :workflow_id, :id_type ),
Display( :workflow_id, N Items( 10 ), "List Display" )
)
)
);

 

 

Any insights or suggestions would be greatly appreciated!

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Implementing dynamic hierarchical filtering in graph builder with local data filters

Maybe making the filter conditional is what you are looking for?

jthi_0-1700915503579.png

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

gb = dt << Graph Builder(
	Size(525, 488),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
	Local Data Filter(
		Conditional,
		Add Filter(
			columns(:sex, :name),
			Display(:name, N Items(15), Find(Set Text("")))
		)
	)
);

 

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Implementing dynamic hierarchical filtering in graph builder with local data filters

Maybe making the filter conditional is what you are looking for?

jthi_0-1700915503579.png

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

gb = dt << Graph Builder(
	Size(525, 488),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
	Local Data Filter(
		Conditional,
		Add Filter(
			columns(:sex, :name),
			Display(:name, N Items(15), Find(Set Text("")))
		)
	)
);

 

-Jarmo
CSkjodt
Level III

Re: Implementing dynamic hierarchical filtering in graph builder with local data filters

It was! Mindblowing that I have missed this, beautiful.

 

Thanks a lot Jarmo