Solutions Company Statit Training Home
 


Placing Charts Side-by-Side in Statit e-QC Output

Abstract: Using HTML code in a macro to control layout

Products: Statit e-QC, Statit e-Server, Statit Custom QC

We have added capabilities for Statit e-QC, Release 2 that make formatting you output possible by mixing StatitScript and a few simple HTML commands. I produced the output below by alternating between StatitScript commands and HTML script. Please note that with introduction of HTMLTemplates in Statit e-QC 3.4, this is easier to accomplish for several macros. Please see.

Take a look at the macro commands in the right-hand cell of the following table and I will try to explain what is happening on the left hand side of the table. It is really quite easy, once you have an example.

Statit e-QC allows you to "get" a Statit work "file". You can also read a spreadsheet, query a database or read almost any other kind of data file. ## Add your commands to retrieve the data below
getfile qc.wrk

You can add just about any HTML script to Statit e-QC output by bracketing it with the Statit commands "BeginHTML" and "EndHTML."

In this case, I wanted to use html script to build a table with one row and two columns. I did this by telling your browser I wanted a table that is 100 percent of the width of the browser window and has a border one pixel wide(<table border=1 width='100%'>. I then told the browser to start a row (<tr>) and start the first column in that row (<td>).

##Bracket html script with the Statit commands
## BeginHTML & EndHTML
BeginHTML
<table border=1 width='100%'>
<tr><td>
EndHTML
You can control the size of the output chart by setting the image height and width with the $web_imageheight and $web_ imagewidth commands in StatitScript. Bet you can't guess which is which. ##Back to StatitScript
##Set the graph output size to 400 x 250 pixels
let $web_imagewidth = 400
let $web_imageheight = 250
Run charts and i-charts are standard Statit output. ##Create a run chart of the
##pressure data with subgroup size of 5
gxchart pressure by 5
Here is where I closed the first column (</td>) and immediately opened the second column (<td>) using html. ##Bracket html script with the Statit commands
## BeginHTML & EndHTML
BeginHTML
</td><td>
EndHTML
I wanted to make the histogram a little smaller than the run chart so I used the $web_imageheight and $web_ imagewidth commands in StatitScript again. ##Back to StatitScript
let $web_imagewidth = 225
let $web_imageheight = 200
Run the histogram command ##Create a histogram of the same data
ghist pressure
Finally, I closed everything up by adding the html tags to close the column (</td>), row (</tr>) and table (</table>) ##Bracket html script with the Statit commands
## BeginHTML & EndHTML
BeginHTML
</td></tr></table>
EndHTML