I am writing a script for a report that automatically imports, rearranges and then produces all the relevant graphs and statistical analyses in the one screen as a final report. I wish for bar chart and area plot (produced from dt and dt3 respectively - see below) in the report to have the same data filter applied to them, which changes both the plots simultaneously. However, I can only get the one graph to change with the data filter - any suggestions? I've included the relevant part of my script below: Also I'm aware the layout isn't the best at the moment, but as I'm pretty new to this scripting thing, I'm just trying to tackle one issue at a time. Thanks!
dt:Sample ID << Set Property( "Link ID", 1 );
dt3:Sample ID << Set Property( "Link Reference", Reference Table( dt ) );
jrnl = New Window( "Screening Summary", <<Report );
jrnl << Append(
H List Box(
(dt_main << Fit definitive screening(
Y( :Y1, :Y2 ),
X( :X1, :X2, :X3 ),
SendToReport( Dispatch( {"Main Effects Plot"}, "FitDefinScreeningPlatform", FrameBox( 4 ), {Frame Size( 44, 38 )} ) )
) ; <<Report);
V List Box(
H List Box(
dt_main << Contour Plot( X( :X1, :X2 ), Y( :Y1 ), Fill Areas( 1 ) );
dt_main << Contour Plot( X( :X1, :X2 ), Y( :Y2 ), Fill Areas( 1 ) );
Data Filter Context Box(
V List Box(
dt_main << Data Filter( Add filter( columns( :X1, :X2, :X3 ) ) ),
H List Box(
dt_main << Graph Builder(
Size( 450, 450 ),
Show Control Panel( 0 ),
Variables(
Y( :Name( "Dx (10)" ) ),
Y( :Name( "Dx (50)" ), Position( 1 ) ),
Y( :Name( "Dx (90)" ), Position( 1 ) ),
Wrap( :Sample ID )
),
Elements( Bar( Y( 1 ), Y( 2 ), Y( 3 ), Legend( 13 ) ) ),
),
dt3 << Graph Builder(
Size( 450, 450 ),
Show Control Panel( 0 ),
Variables(
X( Transform column( "Log10[X]", Formula( Log10( :Name( "J" ) ) ) ) ),
Y( :K),
Wrap( :Sample ID )
),
Elements( Area( X, Y, Legend( 0 ) ) )
),
)
)
);
)
);
)
);