Hängen Sie Diagramme in das neue Fenster einMeine Daten bestehen aus zwei Gruppen von Eingabedaten, die ich in der Spalte „Quelltabelle“ speichere.
Dann schreibe ich die for-Schleife, um Diagramme zu zeichnen und lokale Filter aus der Quelltabelle festzulegen.Die einzelnen Plots erweisen sich als korrekt. In dem neuen Fenster, in dem ich versuche, den Plot anzuhängen, wird jedoch auf die Plots der lokale Filter nicht angewendet.
New Window( "Plot", tb = tab Box() );
For( i = 1, i <= N Items( list ), i++,
obj = Graph Builder(
Size( 1122, 1095 ),
Variables( X( :sequence ), Y( :Data ), Group X( :Source Table), Group X(:SERIAL_NO ), Group Y( :Group ), Overlay( :Label ) ),
Elements( Line( X, Y, Legend( 10 ) ) ),
Local Data Filter(
Add Filter(
columns( :Source Table ),
Where( :Source Table == list [i] ),
Display( :Source Table, Size( 181, 34 ), List Display )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties( 0, {Line Style( "DashDot" )}, Item ID( "CTAP1", 1 ) ),
Properties( 1, {Line Style( "DashDot" )}, Item ID( "CTAP2", 1 ) ),
Properties( 2, {Line Color( 0 ), Line Style( "DashDot" )}, Item ID( "CTAP3", 1 ) ),
Properties( 3, {Line Color( 9 ), Line Style( "DashDot" )}, Item ID( "CTAP4", 1 ) ),
Properties( 4, {Line Style( "Dotted" )}, Item ID( "Inline_X", 1 ) ),
Properties( 5, {Line Style( "Dotted" )}, Item ID( "Inline_Y", 1 ) ),
Properties( 8, {Line Color( 5 )}, Item ID( "MZ1_L", 1 ) ),
Properties( 9, {Line Color( 5 ), Line Style( "Dashed" )}, Item ID( "MZ1_R", 1 ) ),
Properties( 10, {Line Color( 3 )}, Item ID( "MZ2_L", 1 ) ),
Properties( 11, {Line Color( 3 ), Line Style( "Dashed" )}, Item ID( "MZ2_R", 1 ) ),
Properties( 12, {Line Color( 0 )}, Item ID( "MZ3_L", 1 ) ),
Properties( 13, {Line Color( 0 ), Line Style( "Dashed" )}, Item ID( "MZ3_R", 1 ) ),
Properties( 14, {Line Color( 9 )}, Item ID( "MZ4_L", 1 ) ),
Properties( 15, {Line Color( 9 ), Line Style( "Dashed" )}, Item ID( "MZ4_R", 1 ) )
)}
)
)
);
tb << append( "Tab",Report( obj ) );
//obj << delete;
);Betreff: Diagramme in das neue Fenster einfügenJetzt versuche ich, eine weitere Ebene hinzuzufügen, indem ich je nach Untergruppe eine andere „Registerkarte“ erstelle.
Auf der Seite jeder Untergruppe wird das gleiche Diagramm angezeigt (nach: Quelltabelle).
Unten ist das Skript. Ich habe die neue Registerkarte erstellt, aber alle Diagramme befinden sich in der Registerkarte „???“
Summarize( unique_value = by( :SubGroup) );
list1 = unique_value;
Summarize( unique_value = by( :Source Table ) );
list2 = unique_value;
New Window( "Plot", Tab Box( "The Results", tb = Tab Box(), vlb = V List Box() ) );
For( j = 1, j <= N Items( list1 ), j++,
tb << Add(
"Group" || list1[j],
For( i = 1, i <= N Items( list2 ), i++,
tb << append(
vlb << append(
obj = Graph Builder(
Size( 1122, 1095 ),
Variables(
X( :sequence ),
Y( :Data ),
Group X( :Source Table ),
Group X( :SERIAL_NO ),
Group Y( :Group ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 10 ) ) ),
Local Data Filter(
Add Filter(
columns( :Source Table, :SubGroup ),
Where( :Source Table == list2[i] ),
Where( :SubGroup == list1[j] ),
Display( :Source Table, Size( 181, 34 ), List Display )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties( 0, {Line Style( "DashDot" )}, Item ID( "CTAP1", 1 ) ),
Properties( 1, {Line Style( "DashDot" )}, Item ID( "CTAP2", 1 ) ),
Properties( 2, {Line Color( 0 ), Line Style( "DashDot" )}, Item ID( "CTAP3", 1 ) ),
Properties( 3, {Line Color( 9 ), Line Style( "DashDot" )}, Item ID( "CTAP4", 1 ) ),
Properties( 4, {Line Style( "Dotted" )}, Item ID( "Inline_X", 1 ) ),
Properties( 5, {Line Style( "Dotted" )}, Item ID( "Inline_Y", 1 ) ),
Properties( 8, {Line Color( 5 )}, Item ID( "MZ1_L", 1 ) ),
Properties( 9, {Line Color( 5 ), Line Style( "Dashed" )}, Item ID( "MZ1_R", 1 ) ),
Properties( 10, {Line Color( 3 )}, Item ID( "MZ2_L", 1 ) ),
Properties( 11, {Line Color( 3 ), Line Style( "Dashed" )}, Item ID( "MZ2_R", 1 ) ),
Properties( 12, {Line Color( 0 )}, Item ID( "MZ3_L", 1 ) ),
Properties( 13, {Line Color( 0 ), Line Style( "Dashed" )}, Item ID( "MZ3_R", 1 ) ),
Properties( 14, {Line Color( 9 )}, Item ID( "MZ4_L", 1 ) ),
Properties( 15, {Line Color( 9 ), Line Style( "Dashed" )}, Item ID( "MZ4_R", 1 ) )
)}
)
)
)
)
)
)
)
);
Betreff: Diagramme in das neue Fenster einfügenDanke.Betreff: Diagramme in das neue Fenster einfügenIch habe Ihr Skript leicht geändert und es scheint fehlerfrei zu laufen.Die lokalen Filter treffen die verschiedenen Auswahlen.Hier ist mein Skript
Names Default To Here( 1 );
dt = Current Data Table();
Summarize( unique_value = by( :Source Table ) );
list = unique_value;
New Window( "Plot", Tab Box( "The Results", tb = H List Box() ) );
For( i = 1, i <= N Items( list ), i++,
tb << append(
obj = Graph Builder(
Size( 1122, 1095 ),
Variables(
X( :sequence ),
Y( :Data ),
Group X( :Source Table ),
Group X( :SERIAL_NO ),
Group Y( :Group ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 10 ) ) ),
Local Data Filter(
Add Filter(
columns( :Source Table ),
Where( :Source Table == list[i] ),
Display( :Source Table, Size( 181, 34 ), List Display )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties( 0, {Line Style( "DashDot" )}, Item ID( "CTAP1", 1 ) ),
Properties( 1, {Line Style( "DashDot" )}, Item ID( "CTAP2", 1 ) ),
Properties( 2, {Line Color( 0 ), Line Style( "DashDot" )}, Item ID( "CTAP3", 1 ) ),
Properties( 3, {Line Color( 9 ), Line Style( "DashDot" )}, Item ID( "CTAP4", 1 ) ),
Properties( 4, {Line Style( "Dotted" )}, Item ID( "Inline_X", 1 ) ),
Properties( 5, {Line Style( "Dotted" )}, Item ID( "Inline_Y", 1 ) ),
Properties( 8, {Line Color( 5 )}, Item ID( "MZ1_L", 1 ) ),
Properties( 9, {Line Color( 5 ), Line Style( "Dashed" )}, Item ID( "MZ1_R", 1 ) ),
Properties( 10, {Line Color( 3 )}, Item ID( "MZ2_L", 1 ) ),
Properties( 11, {Line Color( 3 ), Line Style( "Dashed" )}, Item ID( "MZ2_R", 1 ) ),
Properties( 12, {Line Color( 0 )}, Item ID( "MZ3_L", 1 ) ),
Properties( 13, {Line Color( 0 ), Line Style( "Dashed" )}, Item ID( "MZ3_R", 1 ) ),
Properties( 14, {Line Color( 9 )}, Item ID( "MZ4_L", 1 ) ),
Properties( 15, {Line Color( 9 ), Line Style( "Dashed" )}, Item ID( "MZ4_R", 1 ) )
)}
)
)
)
)
);
Betreff: Diagramme in das neue Fenster einfügenHi,
Entschuldigung, dass ich mich nicht klar ausgedrückt habe. Ich versuche, 2 Diagramme basierend auf der Spalte „Quelltabelle“ zu erstellen. In den Rohdaten gibt es zwei Kategorien (innere und äußere).
Ich habe Ihr Skript ausprobiert, aber die Liste wieder in den Quelltabellentyp geändert.
Jetzt wird das Diagramm im neuen Fenster angezeigt, aber beide Diagramme zeigen den lokalen Filter Source Table = inner an.
Ich möchte, dass es angezeigt wird
- erstes Diagramm: lokaler Filter Quelltabelle = inner.
- 2. Grafik: Lokaler Filter Quelltabelle = Outter.
Names Default To Here( 1 );
dt = Current Data Table();
Summarize( unique_value = by( :Source Table ) );
list = unique_value;
New Window( "Plot",
tb = Tab Box(),
For( i = 1, i <= N Items( list ), i++,
tb << append(
obj = Graph Builder(
Size( 1122, 1095 ),
Variables(
X( :sequence ),
Y( :Data ),
Group X( :Source Table ),
Group X( :SERIAL_NO ),
Group Y( :Group ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 10 ) ) ),
Local Data Filter(
Add Filter(
columns( :Source Table ),
Where( :Source Table == list[i] ),
Display( :Source Table, Size( 181, 34 ), List Display )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties( 0, {Line Style( "DashDot" )}, Item ID( "CTAP1", 1 ) ),
Properties( 1, {Line Style( "DashDot" )}, Item ID( "CTAP2", 1 ) ),
Properties( 2, {Line Color( 0 ), Line Style( "DashDot" )}, Item ID( "CTAP3", 1 ) ),
Properties( 3, {Line Color( 9 ), Line Style( "DashDot" )}, Item ID( "CTAP4", 1 ) ),
Properties( 4, {Line Style( "Dotted" )}, Item ID( "Inline_X", 1 ) ),
Properties( 5, {Line Style( "Dotted" )}, Item ID( "Inline_Y", 1 ) ),
Properties( 8, {Line Color( 5 )}, Item ID( "MZ1_L", 1 ) ),
Properties( 9, {Line Color( 5 ), Line Style( "Dashed" )}, Item ID( "MZ1_R", 1 ) ),
Properties( 10, {Line Color( 3 )}, Item ID( "MZ2_L", 1 ) ),
Properties( 11, {Line Color( 3 ), Line Style( "Dashed" )}, Item ID( "MZ2_R", 1 ) ),
Properties( 12, {Line Color( 0 )}, Item ID( "MZ3_L", 1 ) ),
Properties( 13, {Line Color( 0 ), Line Style( "Dashed" )}, Item ID( "MZ3_R", 1 ) ),
Properties( 14, {Line Color( 9 )}, Item ID( "MZ4_L", 1 ) ),
Properties( 15, {Line Color( 9 ), Line Style( "Dashed" )}, Item ID( "MZ4_R", 1 ) )
)}
)
)
)
);
);
);
Betreff: Diagramme in das neue Fenster einfügenIch habe eine Liste mit dem Namen „list“ hinzugefügt und musste das schließende „)“ aus der New Window-Anweisung an das Ende des Codes verschieben.Und jetzt funktioniert es mit Ihren Beispieldaten
names default to here(1);
dt=current data table();
list={"data"};
New Window( "Plot", tb = Tab Box() ,
For( i = 1, i <= N Items( list ), i++,
tb << append(
obj = Graph Builder(
Size( 1122, 1095 ),
Variables(
X( :sequence ),
Y( :Data ),
Group X( :Source Table ),
Group X( :SERIAL_NO ),
Group Y( :Group ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 10 ) ) ),
Local Data Filter(
Add Filter(
columns( :Source Table ),
Where( :Source Table == list[i] ),
Display( :Source Table, Size( 181, 34 ), List Display )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties( 0, {Line Style( "DashDot" )}, Item ID( "CTAP1", 1 ) ),
Properties( 1, {Line Style( "DashDot" )}, Item ID( "CTAP2", 1 ) ),
Properties( 2, {Line Color( 0 ), Line Style( "DashDot" )}, Item ID( "CTAP3", 1 ) ),
Properties( 3, {Line Color( 9 ), Line Style( "DashDot" )}, Item ID( "CTAP4", 1 ) ),
Properties( 4, {Line Style( "Dotted" )}, Item ID( "Inline_X", 1 ) ),
Properties( 5, {Line Style( "Dotted" )}, Item ID( "Inline_Y", 1 ) ),
Properties( 8, {Line Color( 5 )}, Item ID( "MZ1_L", 1 ) ),
Properties( 9, {Line Color( 5 ), Line Style( "Dashed" )}, Item ID( "MZ1_R", 1 ) ),
Properties( 10, {Line Color( 3 )}, Item ID( "MZ2_L", 1 ) ),
Properties( 11, {Line Color( 3 ), Line Style( "Dashed" )}, Item ID( "MZ2_R", 1 ) ),
Properties( 12, {Line Color( 0 )}, Item ID( "MZ3_L", 1 ) ),
Properties( 13, {Line Color( 0 ), Line Style( "Dashed" )}, Item ID( "MZ3_R", 1 ) ),
Properties( 14, {Line Color( 9 )}, Item ID( "MZ4_L", 1 ) ),
Properties( 15, {Line Color( 9 ), Line Style( "Dashed" )}, Item ID( "MZ4_R", 1 ) )
)}
)
)
)
);
);
);Betreff: Diagramme in das neue Fenster einfügenHier ist das Beispiel. Danke.
Betreff: Diagramme in das neue Fenster einfügenWenn Sie einige Beispieldaten anhängen, werde ich mir diese ansehen. Die Methode, die ich verwendet habe, ist eine getestete Methode. Ich vermute, dass ein kleiner Fehler vorliegt.Betreff: Diagramme in das neue Fenster einfügenHallo. txnelson
Danke für deine schnelle Antwort, aber es funktioniert nicht. Jetzt wird in einem neuen Fenster nichts mehr angehängt und für jedes Diagramm habe ich zwei Diagramme erhalten.Betreff: Diagramme in das neue Fenster einfügenVersuchen Sie Folgendes ... Ich habe nicht die Daten, um dies zu testen. Wenn Sie jedoch den Anhang verschieben, um die tatsächliche Plattform einzubeziehen, sollten Sie den lokalen Datenfilter erhalten.
New Window( "Plot", tb = Tab Box() );
For( i = 1, i <= N Items( list ), i++,
tb << append(
obj = Graph Builder(
Size( 1122, 1095 ),
Variables(
X( :sequence ),
Y( :Data ),
Group X( :Source Table ),
Group X( :SERIAL_NO ),
Group Y( :Group ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 10 ) ) ),
Local Data Filter(
Add Filter(
columns( :Source Table ),
Where( :Source Table == list[i] ),
Display( :Source Table, Size( 181, 34 ), List Display )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties( 0, {Line Style( "DashDot" )}, Item ID( "CTAP1", 1 ) ),
Properties( 1, {Line Style( "DashDot" )}, Item ID( "CTAP2", 1 ) ),
Properties( 2, {Line Color( 0 ), Line Style( "DashDot" )}, Item ID( "CTAP3", 1 ) ),
Properties( 3, {Line Color( 9 ), Line Style( "DashDot" )}, Item ID( "CTAP4", 1 ) ),
Properties( 4, {Line Style( "Dotted" )}, Item ID( "Inline_X", 1 ) ),
Properties( 5, {Line Style( "Dotted" )}, Item ID( "Inline_Y", 1 ) ),
Properties( 8, {Line Color( 5 )}, Item ID( "MZ1_L", 1 ) ),
Properties( 9, {Line Color( 5 ), Line Style( "Dashed" )}, Item ID( "MZ1_R", 1 ) ),
Properties( 10, {Line Color( 3 )}, Item ID( "MZ2_L", 1 ) ),
Properties( 11, {Line Color( 3 ), Line Style( "Dashed" )}, Item ID( "MZ2_R", 1 ) ),
Properties( 12, {Line Color( 0 )}, Item ID( "MZ3_L", 1 ) ),
Properties( 13, {Line Color( 0 ), Line Style( "Dashed" )}, Item ID( "MZ3_R", 1 ) ),
Properties( 14, {Line Color( 9 )}, Item ID( "MZ4_L", 1 ) ),
Properties( 15, {Line Color( 9 ), Line Style( "Dashed" )}, Item ID( "MZ4_R", 1 ) )
)}
)
)
)
);
);