See also Report Designer Component Properties for properties common to all components.
A Graph component displays series of numeric data in graphical format. Accredo provides Bar, Line or Pie graph styles.
To link data to a graph, the Table property of the graph (for example, Graph1.Table) must be linked to a MemoryTable object using MaxBasic code.
To create a memory table containing the results of the report SQL Query use the CloneQuery function in the AfterQuery code. For example:
Dim Table as Object
Table = CloneQuery
To set a Table as the data source for a Graph component set the Table property to the Memory Table before the band containing the Graph is printed, typically either in the BeforeBand code or the AfterQuery code. For example:
Graph1.Table = Table
Double-click a graph, or right-click and select Graph Editor from the context menu, to display the Graph Editor, which allows selection and customisation of fields in the graph.
The following properties are available for Graph Components:
BackgroundColor |
The graph background colour. Click |
BackWallColor |
The colour used to fill the back wall of the graph. Click |
BackWallStyle |
The style used to fill the back wall of the graph.
|
BarOrientation |
For Bar Graphs, select the orientation of the graph.
|
Fields
|
Click |
GradientDirection |
The gradient direction used to fill the back wall of the graph, when the BackWallStyle bsGradient is selected.
|
ShowAverage |
When True, displays the average amounts across the graph. This is not available to Pie Graphs. |
ShowGridLines |
When True, displays gridlines on the back wall of the graph. This is not available to Pie Graphs. |
ShowLegend |
When True, displays the legend underneath the graph. |
Style |
The type of graph.
|
View3D |
When True, displays the graph in 3D. |
xDataFieldName |
The field that will be used to populate the data on the X Axis of the graph. |
xLabelFieldName |
The field that will be displayed as a label on the X Axis of the graph. |
Note: You can change the colours in a Pie Graph by using the AddPieColor and ResetPieColors methods.