1番目から2番目、2番目から3番目、といったように線を引くのは非常に簡単です。しかし、私の知る限りでは、以下のように各ID値の最後の行に最初のデータポイントを追加する必要があります。ユーザーは、「偽の」行を追加せずに、各IDの最後のデータポイントから最初のデータポイントまでを描画したいと考えています。
dt = New Table( "Test",
New Column( "ID", Values( [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2] )),
New Column( "Position X", Values( [1.3, 1, 2, 2.2, 1.3, ., 3.1, 3, 4, 3.8, 3.1, .])),
New Column( "Position Y", Values([1.2, 2, 2, 1.3, 1.2, ., 3.4, 4, 3.7, 3, 3.4, .])),
New Column( "Vector X", Values([0.5, -0.5, 0.3, 0.9, 0.5, ., 0.3, 0.3, -0.2, 0.7, 0.3, .])),
New Column( "Vector Y", Values( [0.8, 0.4, 0.2, -0.9, 0.8, ., 0.4, 0.8, -0.5, 0.1, 0.4, .]))
);
dt=Graph Builder(
Size( 649, 493 ),
Show Control Panel( 0 ),
Variables(
X( :Position X ), Y( :Position Y ),
Overlay( :ID ), Interval( :Vector X ), Interval( :Vector Y )
),
Elements(
Line(
X, Y, Legend( 17 ),
Ordering( "Within Row" ), Connection( "Arrow" ),
Missing Values( "No Connection" )
),
Line(
X, Y,
Interval( 0 ), Legend( 18 ),
Ordering( "Row Order" ), Missing Values( "No Connection" )
)
),
SendToReport(
Dispatch( {}, "400", ScaleBox,
{Legend Model( 17,
Properties(
-1, {Line Color( 67 )},
Item ID( "Vector X & Vector Y", 1 )
)
), Legend Model(18,
Properties( 0, {Line Color( 69 )}, Item ID( "1", 1 ) ),
Properties( 1, {Line Color( 70 )}, Item ID( "2", 1 ) )
)}
)
)
);