Here is a simple example, using your Example data that creates a graph with a Local Data Filter selecting only the A group data, and then hides the data filter from the display
Names Default To Here( 1 );
dt = New Table( "Example",
Add Rows( 8 ),
New Column( "ID", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 2, 3, 4, 5, 6, 7, 8] ) ),
New Column( "Values",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1.1, 1.2, 1.3, 1.4, 1, 0.9, 0.8, 1.2] )
),
New Column( "Category", Character, "Nominal", Set Values( {"A", "A", "A", "A", "B", "B", "B", "B"} ) )
);
// Here is the graph code
biv =dt << Bivariate(
Y( :Values ),
X( :ID ),
Local Data Filter(
Close Outline( 1 ),
Add Filter( columns( :Category ), Where( :Category == "A" ) )
)
);
// Add this line if you do not want the collapsed Local Data Filter displayed
(report(biv)<<top parent)["Local Data Filter"]<<visibility("Collapse");
This should give you a good start
Jim