
I produced this interactively
- I added an additional Overlay Row to the data table to add the connecting line to finish where it started
- I then dragged the Overlay_column to the color drop box
- I then added a Line to the graph which displayed 2 lines
- I didn't want the black line so I simply set the line color for the black line to white
- That left the markers for the points for the non overlay data looking funny. This is because the former black line is displayed on top of the points.
- To move the black points to be displayed on top of the now white (invisible to the user_ lines, I right clicked on the graph and selected Customize
- I then selected the Marker 0 and using the down arrow, moved the black marker down past the Line(0)
- Which produced the final graph
Here is the JSL that will generate the graph
Graph Builder(
Show Control Panel( 0 ),
Variables(
X( :Ex ),
Y( :Gxy ),
Overlay( :overlay_column ),
Color( :overlay_column )
),
Elements(
Points( X, Y, Legend( 5 ) ),
Line( X, Y, Legend( 6 ), Row order( 1 ) )
),
SendToReport(
Dispatch( {}, "400", ScaleBox,
{Legend Model(
5,
Properties(
0,
{Line Color( 0 ), Marker( "FilledCircle" )},
Item ID( "0", 1 )
),
Properties( 1, {Marker( "Circle" )}, Item ID( "1", 1 ) )
), Legend Model(
6,
Properties( 0, {Line Color( 2 )}, Item ID( "0", 1 ) )
)}
),
Dispatch( {}, "Graph Builder", FrameBox, {Reorder Segs( {1, 2, 5, 6} )} )
)
);
There are other ways to handle this. Here is a straight forward JSL method that uses Add Graphic Script to draw the line

Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( :Ex ), Y( :Gxy ) ),
Elements( Points( X, Y, Legend( 3 ) ) ),
SendToReport(
Dispatch( {}, "Gxy", ScaleBox,
{Min( 0.781114518510881 ), Max( 3.84890945699133 ), Inc( 0.5 ),
Minor Ticks( 0 )}
),
Dispatch( {}, "Graph Builder", FrameBox,
{Add Graphics Script(
2,
Description( "" ),
Pen Color( "Red" );
Line( {5, 1}, {5.5, 3.5}, {10, 3}, {11, 1.5}, {5, 1} );
)}
)
)
);
No overlay column and rows are required
Jim