A graph in DAQFactory is just another component that can be added to any page. The graph component can be moved, resized, copied, and pasted just like the other components we've discussed so far. Graphs have a completely different set of properties however, and offer quite a few advanced features that are not available on the other components.
To create a new graph, simply create a graph component on a page the same way you would a text, or value component. Right click in the blank area of the page where you would like to put the graph and select Graphs and Trends -> 2D Graph from the popup menu. A blank graph will then be displayed. Depending on your screen resolution, you will probably want to resize the graph. This is done just like other components. Select the graph and drag one of the eight black box handles on the selection rectangle. The size of the selection rectangle when you release the mouse button is what determines the final size of the graph.
You may notice that if you click on a graph (without holding the Ctrl key down), a green single-line rectangle will appear around the graph. This is the focus rectangle for a graph. This is used to indicate which graph is the target of many of the graph functions when you have more than one graph on a page.
You can add a trace using the graph's property box. Select the graph and open the properties box using the normal component methods, or simply right click on the graph and select Properties.... Enter in an expression to be used for the trace under Y Expression. This can be any expression you would like, from a simple channel name to a complex calculation. The result should evaluate to an array of numbers otherwise there won't be anything to graph. By default, a new graph is created as a value vs time graph. This means that the X axis will be time and that it will scroll as new data appears. If the X Expression is listed as Time then the time value associated with the result of the Y expression is used for the x location of the data points.
The graph properties box has many sheets, and you can quickly jump to the appropriate sheet by double clicking on an area of the graph to open the properties box to the appropriate sheet. For example, if you double click on an axis, the graph properties box will open to the Axes sheet with the correct axis selected.
When a graph is first created, a trace with a Y Expression of New Trace is created. On the Traces sheet of the graph properties box you will see this trace listed in the list of traces along the left side. The Y expression field will also display New Trace. To create a real trace, simply replace the New Trace with the desired expression in the Y expression field. When you leave that field, the trace list will update itself with the new Y expression for your trace.
Traces have several parameters that control how they are displayed. Here are a few of the basic ones. The more advanced features are discussed a little later:
Legend: If you specify some text for a legend for a trace, a legend will be displayed with your graph. The location of the legend is specified on the General sheet.
Trace Color: You can make a trace any color, or even colorize it based on an expression. To change the color, simply click on the current color of the trace and the MutliColor Picker dialog will be displayed. We'll discuss how to set this up for displaying a multicolor trace a little later. To display the trace in a single color, simply double click on the current color displayed in the first row of the table and select the desired color from the color dialog that appears.
Line Type: Select the desired line type to be used to display the trace. This is only applicable when the axis is set to display a line.
Point Type: Select the desired point type to be used to display the trace. This is only applicable when the axis is set to display points.