Log Driven Graph
A Log Driven Graph is a Table View which graphically displays data provided by a table using a format that allows a large number of simultaneous overlays without requring a column for each. It is very amenable to displaying data logged during a model run.
The view requires that the table have one or more columns with specific column names, as specified below. The order of the columns does not matter and other columns can be included and will be ignored by the view.
The data table can include columns which dynamically reformat the overlays. If the formatting is fixed for each overlay, then specifying a separate formatting table is also supported. This is much more efficient as the format parameters need only be specified once.
Log driven graphs can optionally have the following columns. If a property is common to all data in a given overlay, it is much more efficient to use the Overlay Configuration Table described below to specify the property.
Each overlay is drawn in the order it appears in the data table. If you need an overlay "A" to appear on top of overylay "B", then ensure that the data table is in the order "B", "A".
This provides the x-value (horizontal position) for the data. The format of this column is used to format the graph's x scale. If this column is not present, the row number from the data table is used instead.
This provides the y-value (vertical position) for the data. The format of this column is used to format the graph's y scale. If this column is not present, the value 0 is used.
This is reserved for 3D support
This sets the overlay number that the data in each row is associated with. The Log Driven Graph tracks the plot mode, colour, width, line style and last position of each overlay separately. This means that one data table can contain data for many different views of a system. Its possible to enable/disable individual overlays using the Overlay Configuration Table described below. If this column is not present, the default of one is used. If the value is less than one or greater than the maximum overlay limit parameter for the view, then the data row is ignored.
If this column is present, this value will set the colour of the next section of a line or block, or of the current point or text label in those modes.
If this column is present, this value will set the width of the next line, gantt bar or block, or the diameter of the current point. If this value is zero, it "closes" any previous line or bar. The line/bar will resume starting at the next row with a non zero width. If this column is not present, the default width of one is used but this can be overridden using the Overlay Configuration Table.
If this column is present it will alter the line style for the associated overlay. Some plot modes are not affected by this property. The _line styles label list enumerates the available styles. If this column is not present, solid lines are used but this can be overridden using the Overlay Configuration Table.
If this column is present, it provides text for plot modes which display a text label. The text is the formatted contents of the cell in this column.
If this column is present, it will offset the y value by the value in this cell.
This column may be dropped from views in the future. It can be set in the Configuration Table.
If this column is present, it enables the plotting mode to be changed on-the-fly for this overlay. Subsequent lines/blocks will be drawn using the new plot mode. A value of 0 leaves the current plotting mode. If not otherwise specified, this defaults to the plot mode specified in the edit menu. This column should only be used if you need to dynamically change the plotting mode for a given overlay. You can use the Overlay Configuration Table to set the plot modes for each overlay.
If this column is present, it sets the style of border used in subsequent gantt blocks. By default no border is used.
If this column is present, it sets the color of the border used in subsequent gantt blocks. By default, the transparent (none) colour is used.
Overlay Configuration Table
The defaults for each overlay can be specified using a configuration table. This table is associated with a table view using a reference. It is separate to the data table.
Changes to this table are not tracked in real time by the view. They will be applied the next time the view is redrawn, for example with a force repaint.
The following columns are recognised:
This column must be present. The value sets the overlay number that the data in the row is for. Overlay numbers start from 1. Be aware that if you use a high overlay number, overlay slots are allocated for all intervening overlay values.
This enables the overlay to be shown or hidden from the graph. This is very useful as the underlying data does not need to be modified to remove/add certain overlays. 0 = disable 1 = enable. If this column is not present, all overlays are enabled.
This column enables each overlay to have its own default plot mode.
If this column is not present, all overlays use the plot mode set in the context menu for the view.
This column sets the default colour for each overlay. can be an ARGB value.
If this column is not present, the text colour for the view is used.
This column sets the line width for each overlay.
If this column is not present, the default of 1 is used.
This column sets the line style for lines in the overlays. the _line_styles label list is useful for this.
If this column is not present, the default is a solid line.
This column enables a scale factor to be applied to all y data in a given overlay before it is plotted. This is useful when data with different scale is being combined in a graph.
The auto-y-scale does not consider this scale value when auto-calculating the y scale.
If this column is not present, the default scale of 1.0 is used.
This column enables an offset to be applied to all y data in a given overlay before it is plotted. This is useful when data with different scale is being combined in a graph.
The auto-y-scale does not consider this offset value when auto-calculating the y scale.
If this column is not present, the default offset of 0.0 is used.
This column enables the default block border for gantt blocks to be set. If this column is not present, the default is no borders.
This column enables the default block border colour for gantt blocks to be set. If this column is not present, the default is no colour (transparent).
This column enables the default colour for label text in gantt blocks to be set. The default is the graph background colour.
This column enables the default colour for time text in gantt blocks to be set. The default is the graph background colour.
This enables graph data with 2 different Y scales to be plotted on the one graph. The 2 scales are autocalculated and displayed separately, one on the left and right sides of the graph. To use this first enable the RHS Scale option in the scale options. Set this column to value 1 for overlays that will use the right hand scale.
For Line and Stepped overlays "_linecolor" is used if present instead of "_color".
For Horizontal Bar and Gantt overlays, if _color2 is set as well as _color then the bar is drawn with a gradient from top to bottom. Setting _border_color draws a border around the bar.
The same applies for Vertical Bar (histogram) except the gradient is from left to right.
For Area plots, setting _color2 sets a gradient from the top edge of the plot to the bottom edge, with the area filled in depending on its height. The _Bordercolor, _borderstyle and _width set the style of the edge of the area plot. Note that area plots are cached and drawn last to ensure the area is filled cleanly.
For Point mode, if _color2 is set then the points are drawn with a gradient from center to edge. _width sets the radius and _bordercolor sets the edge.
Parameter used by "Curve" plot modes. This sets how "loose" the curve is through the points, 0 = line, 40 = default, 100 = sloppy.
The _mode column in the data or configuration table controls how the graph displays data for that overlay. Changing mode in the middle of an overlay is supported. The modes are as follows.
0: no change
If the data table has a _mode column with this value, the mode is not changed from previous. If no mode was set, the default mode set in the the view's context menu is used.
1: no plot
This mode causes no plotting to occur for the overlay.
If an entire overlay is not being plotted, it is more efficient to use the _enable property. If you want a region in an overlay to have no plot (eg: a gap between lines or bars) then use a width of 0, dont change modes. Changing mode does not 'close off' the previous line/bar.
Successive points on the overlay are joined directly by lines. The colour, width and style of line sections are set by the starting point. To leave a gap, set the endpoint with a width of 0.
Successive points on the overlay are joined with a horizontal then vertical line. The colour, width and style of line sections are set by the starting point. To leave a gap, set the endpoint with a width of 0.
4: horizontal bar
A horizontal line is drawn between points at the y position of the earlier point. The width parameter sets the thickness of the bar. The colour and width of each bar section are set by the starting point. To leave a gap, set the endpoint with a width of 0.
5: vertical bar
Vertical bars are drawn at each x point connecting the current point's y point to the 0 y point. The width parameter sets the thickness of the bar.
This is like Smooth except the area under the line is filled.
7: labelled bar
This is a gantt bar style display which draws horizontal bars between successive points. The bards can have a customised border (colour and style). The bards includes text with the time and a label which is the formatted text of the _label column. Note that the separate 'Gantt' table view has more flexibility. This mode is useful where gantts are overlaid with other view modes on the same graph.
8: Centred Label
This draws text (supplied by the label column) centred at the x/y position specified on that row on the graph.
This draws a point at the x/y position specified, with the radius specified by the width parameter.
Like Line but uses a curve-fit draw. This makes use of a parameter "Tension" (can be set as _tension in the log driven configuration table). This sets how "loose" the curve is through the points, 0 = line, 40 = default, 100 = sloppy.
11: Area Stepped
12: Point Rectangle
Used to draw rectangles with co-ordinates based on graph-space values. Used with transparency, it is very effective for highlighting parts of a graph display.
If _borderstyle is set, a border can be shown with _bordercolor if the _Borderstyle is set to "Single" or "Double". The standard rectangle border styles are supported.
The _x and _y co-ords set the lower left corner of the rectangle. Additional columns _x2 and _y2 are used to specify the top right corner of the rectangle.
13: Point Line
Used to draw a line with co-ordinates all passed in a single row of the data table. This requires columns _x, _y, _x2, _y2 and supports _color (or _linecolor if present), _width and _style columns.
First Overlay and Last Overlay select the range of overlay numbers to draw. These options are superceeded by the use of the _enable column in the configuration table but will still take precedence if set.