You are removing the selection of the Value Color when you are specifying the Line Color on the Fit Where. Below is an example where the colors remain the same
Names Default To Here( 1 );
dt = Current Data Table();
Show( :Run << get property( "Value Colors" ) );
:Run << set property( "Value Colors", {"10" = 35, "14" = 68, "24" = 77, "32" = 75} );
:Run << color cell by value( 1 );
Show( :Run << get property( "Value Colors" ) );
Bivariate(
Y( :Result ),
X( :Date ),
Fit Where( :Run == "10", Fit Line() ),
Fit Where( :Run == "14", Fit Line() ),
Fit Where( :Run == "24", Fit Line() ),
Fit Where( :Run == "32", Fit Line() ),
Local Data Filter(
Add Filter(
columns( :Date ),
Where( :Date >= 12Mar2022:05:43:20 & :Date <= 06May2022 )
)
),
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Row Legend(
Run,
Color( 1 ),
Color Theme( "" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);
Jim