The best way to learn about what charts are available, is to look through the document, Essential Graphing
Help==>Essential Graphing
Then, after you have run a graph, you can select from the red triangle in the graphical output, to save the script. It is from there you will get the code on what you need to use to generate the graphs.
Below is a modification to the script that was previously provided. I have modified it to check to make sure the reference lines are displayed.
Names Default To Here( 1 );
dt = Current Data Table();
// Get all of the by values, since separate code will have to be added for each
Summarize( dt, byVals = by( :Label ) );
// Generate the Plot code
op = Overlay Plot( X( :name ), Y( :Data ), by( :label ) );
For( i = 1, i <= N Items( byVals ), i++,
// Get the LCL and UCL values for this by group
LCL = :LCL[(dt << get rows where( :Label == byVals[i] ))[1]];
UCL = :UCL[(dt << get rows where( :Label == byVals[i] ))[1]];
// Make sure the UCL and LCL values are displayed
chartMin = Min( :data[dt << get rows where( :Label == byVals[i])]);
chartMax = Max( :data[dt << get rows where( :Label == byVals[i])]);
If(LCL < chartMin, chartMin = LCL );
If(UCL > chartMax, chartMax = UCL );
chartRange5% = (chartMax - ChartMin)/20;
chartMin = chartMin - chartRange5%;
chartMax = chartMax + chartRange5%;
// Generate the code to produce the LCL and UCL reference lines
Eval(
Substitute(
Expr(
op << SendToByGroup(
{:Label == __byVals__},
Y Axis[1] << {{Min( __min__ ), Max( __max__ ),
Add Ref Line( __LCL__, "Solid", "Medium Dark Red", "LCL", 1 ),
Add Ref Line( __UCL__, "Solid", "Medium Dark Red", "UCL", 1 )}}
)
),
Expr( __byVals__ ), byVals[i],
Expr( __UCL__ ), UCL,
Expr( __LCL__ ), LCL,
Expr( __min__ ), chartMin,
Expr( __max__ ), chartMax
)
);
);
Jim