how to make a content for the graphs in a report?Hi,
I have a lot of graphs in my report window that are created by graph builder. I like to have a window with the content of my graph and when I click on them, it can show me the identified graph.
I could not find any similar problem an solution. I will appreciate if someone can help me.
Thanks
ScriptingRe: how to make a content for the graphs in a report?Here are a couple of ways to do this:
Other methods also exist
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
nw = New Window( "Graphs",
V List Box(
ob1 = Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) )
);
ob1rpt = Report( ob1 );
ob1rpt[Outline Box( 1 )] << set title( "Graph 1" );
ob1rpt << close;
ob2 = Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( Y( :weight ), X( :sex ) ),
Elements( Points( X, Y, Legend( 6 ) ) )
);
ob2rpt = Report( ob2 );
ob2rpt[Outline Box( 1 )] << set title( "Graph " );
ob2rpt << close;
)
);
nw2 = New Window( "Graphs",
V List Box(
Button Box( "Graph 1",
Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) )
)
),
Button Box( "Graph 2",
Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( Y( :weight ), X( :sex ) ),
Elements( Points( X, Y, Legend( 6 ) ) )
)
)
)
);Re: how to make a content for the graphs in a report?Thank Jim
as always your idea is very good. But in my case I like to have everything in the same Report window since there is a Filter Data window for different products that are for all graphs. in your example the graph opens in different window that make it difficult to look at different products in two windows.Re: how to make a content for the graphs in a report?Here is another method that will give you a possible solution that is acceptable
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
nw2 = New Window( "Graphs",
hlb = H List Box(
V List Box(
Button Box( "Graph 1",
Try( Report( gb ) << delete );
hlb << append(
gb = Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) )
)
);
),
Button Box( "Graph 2",
Try( Report( gb ) << delete );
hlb << append(
gb = Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( Y( :weight ), X( :sex ) ),
Elements( Points( X, Y, Legend( 6 ) ) )
)
);
)
)
)
);Re: how to make a content for the graphs in a report?Hi Jim
If I want to have multiple plots in one Button Box, the plots have to be deleted when I click on the other Button. as you had in your script. sometime I have 4 plots or 6, how I can delete whole the report in one button without deleting (gb1,gb2,gb3....)?