I take what I said back about both bars and lines in the same window. Below should give you the graph for which you are looking.
Names Default To Here( 1 );
// Create original data table.
dt = New Table( "Defects",
Add Rows( 14 ),
New Column( "Defects", Numeric, Continuous, Format( "Best", 12 ), Set Values( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] ) ),
New Column( "A", Numeric, Continuous, Format( "Percent", 12, 2 ), Formula( Random Uniform( 0, 0.002 ) ) ),
New Column( "B", Numeric, Continuous, Format( "Percent", 12, 2 ), Formula( Random Uniform( 0, 0.002 ) ) ),
New Column( "C", Numeric, Continuous, Format( "Percent", 12, 2 ), Formula( Random Uniform( 0, 0.002 ) ) ),
New Column( "D", Numeric, Continuous, Format( "Percent", 12, 2 ), Formula( Random Uniform( 0, 0.002 ) ) ),
New Column( "E", Numeric, Continuous, Format( "Percent", 12, 2 ), Formula( Random Uniform( 0, 0.002 ) ) )
);
// Transpose data table.
dtTrans = dt << Transpose( columns( :A, :B, :C, :D, :E ), Label( :Defects ), Output Table( "Transpose of Defects" ) );
// Add yield columns.
dtTrans << New Column( "Yield1",
Numeric,
Continuous,
Format( "Percent", 12, 2 ),
Formula(
1 - Sum(
:Name( "1" ),
:Name( "2" ),
:Name( "3" ),
:Name( "4" ),
:Name( "5" ),
:Name( "6" ),
:Name( "7" ),
:Name( "8" ),
:Name( "9" ),
:Name( "10" ),
:Name( "11" ),
:Name( "12" ),
:Name( "13" ),
:Name( "14" )
)
)
);
dtTrans << New Column( "Yield2",
Numeric,
Continuous,
Format( "Percent", 12, 2 ),
Formula(
1 - 2 * Sum(
:Name( "1" ),
:Name( "2" ),
:Name( "3" ),
:Name( "4" ),
:Name( "5" ),
:Name( "6" ),
:Name( "7" ),
:Name( "8" ),
:Name( "9" ),
:Name( "10" ),
:Name( "11" ),
:Name( "12" ),
:Name( "13" ),
:Name( "14" )
)
)
);
// Create graph.
dtTrans << Graph Builder(
Show Control Panel( 0 ),
Variables(
X( :Label ),
Y( :Yield1, Side( "Right" ) ),
Y( :Yield2, Position( 1 ), Side( "Right" ) ),
Y( :Name( "1" ), Position( 1 ) ),
Y( :Name( "2" ), Position( 1 ) ),
Y( :Name( "3" ), Position( 1 ) ),
Y( :Name( "4" ), Position( 1 ) ),
Y( :Name( "5" ), Position( 1 ) ),
Y( :Name( "6" ), Position( 1 ) ),
Y( :Name( "7" ), Position( 1 ) ),
Y( :Name( "8" ), Position( 1 ) ),
Y( :Name( "9" ), Position( 1 ) ),
Y( :Name( "10" ), Position( 1 ) ),
Y( :Name( "11" ), Position( 1 ) ),
Y( :Name( "12" ), Position( 1 ) ),
Y( :Name( "13" ), Position( 1 ) ),
Y( :Name( "14" ), Position( 1 ) )
),
Elements(
Bar(
X,
Y( 3 ),
Y( 4 ),
Y( 5 ),
Y( 6 ),
Y( 7 ),
Y( 8 ),
Y( 9 ),
Y( 10 ),
Y( 11 ),
Y( 12 ),
Y( 13 ),
Y( 14 ),
Y( 15 ),
Y( 16 ),
Legend( 3 ),
Bar Style( "Stacked" ),
Summary Statistic( "Mean" )
),
Line( X, Y( 1 ), Y( 2 ), Legend( 4 ), Row order( 0 ), Summary Statistic( "Mean" ) )
),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Format( "Percent", 12, 2 )} ),
Dispatch( {}, "Yield1", ScaleBox, {Format( "Percent", 12, 2 )} ),
Dispatch( {}, "400", ScaleBox, {Legend Model( 4, Properties( 0, {Line Width( 3 )} ), Properties( 1, {Line Width( 3 )} ) )} ),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "Sample Trend" )} ),
Dispatch( {}, "Y title", TextEditBox, {Set Text( "Defect Rate" )} ),
Dispatch( {}, "Y r title", TextEditBox, {Set Text( "Yield" )} )
)
);