There's a bug in JMP 16 under certain conditions when you save HTML graphs that use a local data filter. I found the fix where you have to Show Modes and then uncheck Include. But that doesn't work in this situation:
- Create two graphs, from different tables, each with their own local data filter.
- Combine them into a window using new window, on separate tabs
- Save as Interactive HTML with data
- The local data filter for the first graph works.
- The local data filter for the second graph doesn't work.
HOWEVER: it works in JMP 18. Here's some code that demonstrates the bug in JMP16. Uses the attached tables.
dt1 = data table("Indication HLTs");
ind_expr = expr(
gb1 = dt1 << Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables(
X( :"Month-Year"n ),
Y( :Cases for Event ),
Overlay( :Indication HLT )
),
Elements( Line( X, Y, Legend( 7 ) ) ),
Local Data Filter(
Close Outline( 1 ),
Show Modes( 1 ),
Mode( Include( 0 ) ),
Add Filter(
columns( :Indication HLT ),
Display( :Indication HLT, N Items( 9 ) ),
Order By Count( :Indication HLT )
)
)
);
);
dt2 = data table("Country");
ctry_expr = expr(
gb2 = dt2 << Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables(
X( :"Month-Year"n ),
Y( :Cases for Event ),
Overlay( :"Country/Territory"n )
),
Elements( Line( X, Y, Legend( 17 ) ) ),
Local Data Filter(
Close Outline( 1 ),
Show Modes( 1 ),
Mode( Include( 0 ) ),
Add Filter(
columns( :"Country/Territory"n ),
Display( :"Country/Territory"n, N Items( 15 ) ),
Order By Count( :"Country/Territory"n )
)
)
);
);
nw = new window("Test HTML Local Data Filter",
tab box(
tab page box("Indications", ind_expr),
tab page box("Country", ctry_expr),
)
);
Run the code and then click File > Save As and save as .html with data.