GraphModel class is used to output graph data and image files.
The class can be called from DataManager class.
.
More...
Public Member Functions | |
| void | AddDataSet (DataSet *set, int pos=-1) |
| Adds dataset to a graph. More... | |
| Variant | GetAllXAxisTypes () |
| Returns a list of type names of X-axis types that can be set. More... | |
| bool | GetAverageVisible (Variant val) |
| Returns whether or not the line average is displayed or hidden on the graph by specifying the line ID or name. More... | |
| Variant | GetColor (Variant val) |
| Returns the line color on the graph by specifying the line ID or name. More... | |
| Variant | GetGraphProperty (String &name) |
| Returns setting for an item. More... | |
| bool | GetHCrossPoint (Variant val) |
| Returns whether or not the cross point (horizontal) of the line is displayed or hidden on the graph by specifying the line ID or name. More... | |
| String | GetLineName (int line) |
| Returns the line name by specifying the Line ID. More... | |
| Variant | GetLineType (Variant val) |
| Returns the graph type of the line on the graph by specifying the line ID or name. More... | |
| bool | GetLineVisible (Variant val) |
| Returns whether or not the line is displayed or hidden on the graph by specifying the line ID or name. More... | |
| String | GetName () |
| Returns the name of graph model as a string. More... | |
| bool | GetRMSVisible (Variant val) |
| Returns whether or not the line RMS is displayed or hidden on the graph by specifying the line ID or name. More... | |
| Variant | GetSymbol (Variant val) |
| Returns the line symbol on the graph by specifying the line ID or name. More... | |
| bool | GetVCrossPoint (Variant val) |
| Returns whether or not the cross point (vertical) of the line is displayed or hidden on the graph by specifying the line ID or name. More... | |
| String | GetXAxisType () |
| Returns current X-axis type. More... | |
| Variant | GetYAxisPosition (Variant val) |
| Returns the Y-axis of the line on the graph by specifying the line ID or name. More... | |
| void | Hide () |
| Hides the [Graph] dialog. | |
| virtual bool | IsValid () |
| Returns True if an object is valid. More... | |
| int | NumLines () |
| Returns the number of lines for a graph model. More... | |
| bool | SaveGraphImage (String &filename, int width, int height) |
| Specifies the size of the graph image and saves it. More... | |
| void | SetAverageVisible (Variant val, bool show) |
| Specifies whether or not to display or hide the line average on the graph. The line is specified by its name or ID. More... | |
| void | SetColor (Variant val, Variant value) |
| Specifies the color of the line on the graph. The line is specified by its name or ID. More... | |
| void | SetGraphProperty (String &name, Variant var) |
| Specifies the graph properties by specifying the item name and the value. More... | |
| void | SetHCrossPoint (Variant val, bool show) |
| Specifies whether or not to display or hide the cross point (horizontal) on the graph. The line is specified by its name or ID. More... | |
| void | SetLineName (int line, String &name) |
| Specifies line ID and sets name for line. More... | |
| void | SetLineType (Variant val, Variant value) |
| Specifies the graph type of the line on the graph. The line is specified by its name or ID. More... | |
| void | SetLineVisible (Variant val, bool show) |
| Specifies whether or not to display or hide lines in a graph. The line is specified by its name or ID. More... | |
| void | SetName (String &name) |
| Specifies the name of a graph model. | |
| void | SetRMSVisible (Variant val, bool show) |
| Specifies whether or not to display or hide the line RMS. The line is specified by its name or ID. More... | |
| void | SetSymbol (Variant val, Variant value) |
| Specifies the symbol of the line on the graph. The line is specified by its name or ID. More... | |
| void | SetVCrossPoint (Variant val, bool show) |
| Specifies whether or not to display or hide the cross point (vertical) on the graph. The line is specified by its name or ID. More... | |
| void | SetXAxisType (String &type) |
| Changes X-axis type to another type. More... | |
| void | SetYAxisPosition (Variant val, Variant value) |
| Specifies the label position of the Y-axis of the line on the graph. The line is specified by its name or ID. More... | |
| void | Show () |
| Displays the [Graph] dialog. | |
| void | WriteAllCaseTable (String &filename) |
| Exports the data of all cases to a file. More... | |
| void | WriteAllCaseVisibleTable (String &filename) |
| Exports data to a file for all the cases of the selected check boxes shown under Line Options. More... | |
| void | WriteTable (String &filename) |
| Exports the data to a file. More... | |
| void | WriteVisibleTable (String &filename) |
| Exports data of the selected check boxes shown under Line Options to a file. More... | |
GraphModel class is used to output graph data and image files.
The class can be called from DataManager class.
.
Example of obtaining the class object:
| void GraphModel::AddDataSet | ( | DataSet * | set, |
| int | pos = -1 |
||
| ) |
Adds dataset to a graph.
| set | DataSet object |
| pos | Position to be added |
pos can be omitted. The position is added to the end of the list when left out.
| Variant GraphModel::GetAllXAxisTypes | ( | ) |
Returns a list of type names of X-axis types that can be set.
| bool GraphModel::GetAverageVisible | ( | Variant | val | ) |
Returns whether or not the line average is displayed or hidden on the graph by specifying the line ID or name.
| val | Name or index of the line |
| Variant GraphModel::GetColor | ( | Variant | val | ) |
Returns the line color on the graph by specifying the line ID or name.
| val | Name or index of the line |
| Variant GraphModel::GetGraphProperty | ( | String & | name | ) |
Returns setting for an item.
| name | Item name
|
| bool GraphModel::GetHCrossPoint | ( | Variant | val | ) |
Returns whether or not the cross point (horizontal) of the line is displayed or hidden on the graph by specifying the line ID or name.
| val | Name or index of the line |
| String GraphModel::GetLineName | ( | int | line | ) |
Returns the line name by specifying the Line ID.
| line | Line ID |
| Variant GraphModel::GetLineType | ( | Variant | val | ) |
Returns the graph type of the line on the graph by specifying the line ID or name.
| val | Name or index of the line |
| bool GraphModel::GetLineVisible | ( | Variant | val | ) |
Returns whether or not the line is displayed or hidden on the graph by specifying the line ID or name.
| val | Name or index of the line |
| String GraphModel::GetName | ( | ) |
Returns the name of graph model as a string.
| bool GraphModel::GetRMSVisible | ( | Variant | val | ) |
Returns whether or not the line RMS is displayed or hidden on the graph by specifying the line ID or name.
| val | Name or index of the line |
| Variant GraphModel::GetSymbol | ( | Variant | val | ) |
Returns the line symbol on the graph by specifying the line ID or name.
| val | Name or index of the line |
| bool GraphModel::GetVCrossPoint | ( | Variant | val | ) |
Returns whether or not the cross point (vertical) of the line is displayed or hidden on the graph by specifying the line ID or name.
| val | Name or index of the line |
| String GraphModel::GetXAxisType | ( | ) |
Returns current X-axis type.
| Variant GraphModel::GetYAxisPosition | ( | Variant | val | ) |
Returns the Y-axis of the line on the graph by specifying the line ID or name.
| val | Name or index of the line |
|
virtual |
Returns True if an object is valid.
| int GraphModel::NumLines | ( | ) |
Returns the number of lines for a graph model.
| bool GraphModel::SaveGraphImage | ( | String & | filename, |
| int | width, | ||
| int | height | ||
| ) |
Specifies the size of the graph image and saves it.
| filename | File path (jpeg, png, bmp, svg) |
| width | Image width |
| height | Image height |
| void GraphModel::SetAverageVisible | ( | Variant | val, |
| bool | show | ||
| ) |
Specifies whether or not to display or hide the line average on the graph. The line is specified by its name or ID.
| val | Name or index of the line |
| show | True=1 : Displays a line average
False=0 : Hides a line average
|
| void GraphModel::SetColor | ( | Variant | val, |
| Variant | value | ||
| ) |
Specifies the color of the line on the graph. The line is specified by its name or ID.
| val | Name or index of the line |
| value | Name or index of the color 0 : "Black"
1 : "Red"
2 : "Green"
3 : "Blue"
4 : "Cyan"
5 : "Magenta"
6 : "Yellow"
7 : "Gray"
8 : "Dark Red"
9 : "Dark Green
10 : "Dark Blue"
11 : "Dark Cyan"
12 : "Dark Magenta"
13 : "Dark Yellow"
14 : "Dark Gray"
|
| void GraphModel::SetGraphProperty | ( | String & | name, |
| Variant | var | ||
| ) |
Specifies the graph properties by specifying the item name and the value.
| name | Item name
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| var | Value GridLine
|
| void GraphModel::SetHCrossPoint | ( | Variant | val, |
| bool | show | ||
| ) |
Specifies whether or not to display or hide the cross point (horizontal) on the graph. The line is specified by its name or ID.
| val | Name or index of the line |
| show | True=1 : Displays a Cross point to horizontal line
False=0 : Hides a Cross point to horizontal line
|
| void GraphModel::SetLineName | ( | int | line, |
| String & | name | ||
| ) |
Specifies line ID and sets name for line.
| line | Line ID |
| name | Line name |
| void GraphModel::SetLineType | ( | Variant | val, |
| Variant | value | ||
| ) |
Specifies the graph type of the line on the graph. The line is specified by its name or ID.
| val | Name or index of the line |
| value | Name or index of the graph type 0 : "Curve"
1 : "Scatter"
2 : "Histogram"
|
| void GraphModel::SetLineVisible | ( | Variant | val, |
| bool | show | ||
| ) |
Specifies whether or not to display or hide lines in a graph. The line is specified by its name or ID.
| val | Name or index of the line |
| show | True=1 : Displays a line
False=0 : Hides a line
|
| void GraphModel::SetRMSVisible | ( | Variant | val, |
| bool | show | ||
| ) |
Specifies whether or not to display or hide the line RMS. The line is specified by its name or ID.
| val | Name or index of the line |
| show | True=1 : Displays a line RMS
False=0 : Hides a line RMS
|
| void GraphModel::SetSymbol | ( | Variant | val, |
| Variant | value | ||
| ) |
Specifies the symbol of the line on the graph. The line is specified by its name or ID.
| val | Name or index of the line |
| value | Name or index of the symbol 0 : "None"
1 : "Ellipse"
2 : "Rectangle"
3 : "Diamond"
4 : "Down Triangle"
5 : "Up Triangle"
6 : "Left Triangle"
7 : "Right Triangle"
8 : "+ Plus"
9 : "x Cross"
|
| void GraphModel::SetVCrossPoint | ( | Variant | val, |
| bool | show | ||
| ) |
Specifies whether or not to display or hide the cross point (vertical) on the graph. The line is specified by its name or ID.
| val | Name or index of the line |
| show | True=1 : Displays the cross point (vertical) of the lines
False=0 : Hides the cross point (vertical) of the lines
|
| void GraphModel::SetXAxisType | ( | String & | type | ) |
Changes X-axis type to another type.
| type | Specifies X-axis type name
|
| void GraphModel::SetYAxisPosition | ( | Variant | val, |
| Variant | value | ||
| ) |
Specifies the label position of the Y-axis of the line on the graph. The line is specified by its name or ID.
| val | Name or index of the line |
| value | Name or index of the Y-axis label position 0 : "Left"
1 : "Right"
|
| void GraphModel::WriteAllCaseTable | ( | String & | filename | ) |
Exports the data of all cases to a file.
| filename | File path |
Refers to WriteTable for the output file format.
| void GraphModel::WriteAllCaseVisibleTable | ( | String & | filename | ) |
Exports data to a file for all the cases of the selected check boxes shown under Line Options.
| filename | File path |
Refers to WriteTable for the output file format.
| void GraphModel::WriteTable | ( | String & | filename | ) |
Exports the data to a file.
| filename | File path |
Output file formats are different according to their specified extensions.
| void GraphModel::WriteVisibleTable | ( | String & | filename | ) |
Exports data of the selected check boxes shown under Line Options to a file.
| filename | File path |
Refers to WriteTable for the output file format.