Log Driven Graph: Difference between revisions

From Planimate Knowledge Base
Jump to navigation Jump to search
mNo edit summary
Line 7: Line 7:
__TOC__
__TOC__


===Data Columns===
=== Data Columns ===
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.
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.  
====_x====
 
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.
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".
====_y====
 
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.
==== _x ====
====_z====
 
This is reserved for 3D support
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.  
====_overlay====
 
This sets the overlay number that the data in each row is associated with.
==== _y ====
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.
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.  
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.
 
====_color====
==== _z ====
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.
 
====_width====
This is reserved for 3D support  
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.
==== _overlay ====
====_style====
 
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.
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 not present, solid lines are used but this can be overridden using the Overlay Configuration Table.
 
====_label====
==== _color ====
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.
 
====_yoffset====
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, it will offset the y value by the value in this cell.<br/>
 
This column may be dropped from views in the future. It can be set in the Configuration Table.
==== _width ====
====_mode====
 
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.
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.  
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.
==== _style ====
====_borderstyle====
 
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 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.  
====_bordercolor====
 
==== _label ====
 
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.  
 
==== _yoffset ====
 
If this column is present, it will offset the y value by the value in this cell.<br> This column may be dropped from views in the future. It can be set in the Configuration Table.  
 
==== _mode ====
 
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.  
 
==== _borderstyle ====
 
If this column is present, it sets the style of border used in subsequent gantt blocks. By default no border is used.  
 
==== _bordercolor ====
 
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.
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.
[[Category:Table]]
[[Category:View]]
===Overlay Configuration Table===
===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.</br>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.</br>The following columns are recognised:
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.</br>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.</br>The following columns are recognised:

Revision as of 16:12, 17 February 2009

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.

Data Columns

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".

_x

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.

_y

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.

_z

This is reserved for 3D support

_overlay

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.

_color

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.

_width

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.

_style

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.

_label

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.

_yoffset

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.

_mode

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.

_borderstyle

If this column is present, it sets the style of border used in subsequent gantt blocks. By default no border is used.

_bordercolor

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:

_overlay

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.

_enable

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.

_mode

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.

_color

This column sets the default colour for each overlay.
If this column is not present, the text colour for the view is used.

_width

This column sets the line width for each overlay.
If this column is not present, the default of 1 is used.

_style

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.

_yscale

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.

_yoffset

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.

_borderstyle

This column enables the default block border for gantt blocks to be set. If this column is not present, the default is no borders.

_bordercolor

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).

_labelcolor

This column enables the default colour for label text in gantt blocks to be set. The default is the graph background colour.

_timecolor

This column enables the default colour for time text in gantt blocks to be set. The default is the graph background colour.

_rhsscale

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.

Plot Modes

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.

2: line

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.

3: stepped

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.

6: area

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: label

This draws text (supplied by the label column) centred at the x/y position specified on that row on the graph.

9: point

This draws a point at the x/y position specified, with the radius specified by the width parameter.

Options

Visibility Control enables the view to be displayed only under certain conditions.
Action Control enables the view to become responsive to clicks under certain conditions.

Graph Scale Parameters and Graph Scale Options select whether automatic or manual scale calculations are performed, grid line display and scale text display.

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.