Hide Comments
Hide Comments

Comments (0)

Automatically arranges the graph chart - it is responsible for "pretty-organizing" our chart. The Arrange method ensures that there are no overlapping shapes and tries to avoid links running criss-crossing throughout the chart.

For a lot of graph charts, such as org charts and flow charts, nodes/values are not just scattered about the chart surface. There is a definite organization, e.g., things flow from a top to a bottom (or a left to a right) and many nodes are considered equivalent so they are placed at the same level as other nodes. The Level property of chart values ( RSGraphCharts|TRSGraphChartValue ) is an integer property from 0 to whatever specifying the level of a node. The  Arrange method uses the  Level property to divide the chart canvas into a big grid, where each cell in the grid can contain one chart value. One axis of this virtual grid will be the Levels in the chart. The other axis will be all the nodes/values at that level. The  Orientation property controls in what direction we place the levels.

For example, suppose the Orientation is coTopDown and a graph is made up of the following nodes:
 

Level 0: Startup
Level 1: Research
Level 2: Development
Level 3: Manufacturing, Testing, and Marketing
Level 4: Purchases, Sales

Example

      -------------------------------------------------
       |               |               |               |
       |               | Startup       |               | Level 0
       |               |               |               |
       -------------------------------------------------
       |               |               |               |
       |               | Research      |               | Level 1
       |               |               |               |
       -------------------------------------------------
       |               |               |               |
       |               | Development   |               | Level 2
       |               |               |               |
       -------------------------------------------------
       |               |               |               |
       | Manufacturing | Testing       | Marketing     | Level 3
       |               |               |               |
       -------------------------------------------------
               |               |               |
               | Purchases     | Sales         | Level 4
               |               |               |
               ---------------------------------

Namespace: FMX.RS.GraphCharts

expandingSyntax

Delphi

public 
  procedure Arrange; virtual; 
 

expandingRemarks

The arrange method uses a very simple arrangment where it creates a grid where one axis is the number of levels and the second axis is maximum number of nodes at any one level... grid size is based on maximums of dimensions of width and height (+10%)
 

expandingSee Also

Comments (0)

RiverSoftAVG Charting Component Suite (RCCS) © 2005-2015, Thomas G. Grubb