Previous Topic

Next Topic

Book Contents

Book Index

Graph Components

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 Open Color Dialog (F2) to select the colour. See Color Property.

BackWallColor

The colour used to fill the back wall of the graph. Click Open Color Dialog (F2) to select the colour. See Color Property.

BackWallStyle

The style used to fill the back wall of the graph.

  • bsPlain - Fill the back wall with solid colour selected in BackWallColor.
  • bsGradient - Fill the back wall with gradually changing colour from white to the selected BackWallColor, in the direction selected in GradientDirection.

BarOrientation

For Bar Graphs, select the orientation of the graph.

  • gboVertical - The bars will be displayed vertically.
  • gboHorizontal - The bars will be displayed horizontally.

Fields

 

Click CodeEdit Open Graph Editor (F2) to open the the Graph Editor. Use the Graph Editor to select and customise fields in the graph.

GradientDirection

The gradient direction used to fill the back wall of the graph, when the BackWallStyle bsGradient is selected.

  • gdTopBottom - Fill the back wall of the graph with the selected BackWallColor at the top, gradually changing to white at the bottom of the graph.
  • gdBottomTop - Fill the back wall of the graph with the selected BackWallColor at the bottom, gradually changing to white at the top of the graph.
  • gdLeftRight - Fill the back wall of the graph with the selected BackWallColor at the left, gradually changing to white at the right of the graph.
  • gdRightLeft - Fill the back wall of the graph with the selected BackWallColor at the right, gradually changing to white at the left of the graph.
  • gdFromCenter - Fill the back wall of the graph with white at the centre, gradually changing to the selected BackWallColor at the corners of the graph.
  • gdFromTopLeft - Fill the back wall of the graph with the selected BackWallColor at the top left, gradually changing to white at the bottom right of the graph.
  • gdFromBottomLeft - Fill the back wall of the graph with the selected BackWallColor at the bottom left, gradually changing to white at the top right of the graph.
  • gdRadial - Fill the back wall of the graph with white at the centre, gradually changing to the selected BackWallColor at the corners of the graph in a circular change.
  • gdDiagonalUp - Fill the back wall of the graph with the selected BackWallColor at the top right, gradually changing to white at the bottom left of the graph.
  • gdDiagonalDown - Fill the back wall of the graph with the selected BackWallColor at the bottom right, gradually changing to white at the top left of the graph.

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.

  • csBar - Bar Graph.
  • csLine - Line Graph.
  • csPie - Pie 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.

In This Section

Graph Editor