ChartDirector Ver 5.0 (PHP Edition)

ChartDirector Object Model Overview

This section will give a very brief high level overview of the ChartDirector object model, which may be helpful for understanding of subsequent ChartDirector tutorials. The full details object model and API are documented in the ChartDirector Reference section.

The Top Level

At the top level, all ChartDirector charts (including meters) are subclass of the BaseChart class. The following describes the top level class hierarchy.

- BaseChart : Base class for all charts (including meters) in ChartDirector.
  - PieChart : Represents pie and donut charts
  - XYChart : Represents all charts that have x and y axes, except surface charts.
  - SurfaceChart : Represents surface charts.
  - PolarChart : Represents all charts that uses polar coordinates.
  - PyramidChart : Represents pyramid, cone and funnel charts.
  - BaseMeter : Base class for all meters in ChartDirector.
    - AngularMeter : Represents angular meters.
    - LinearMeter : Represents linear meters.
  - MultiChart : A container chart that can be used to combine multiple BaseChart objects together.
    - FinanceChart : Represents complex finance charts.

BaseChart

The BaseChart class represents features common to all ChartDirector charts, such as the chart background, legend box (LegendBox), titles and custom text boxes (TextBox). It also contains a DrawArea tool, which allows you to add arbitrary custom drawings to the chart.

PieChart

The PieChart class, as it name implies, represents pie charts, including donut charts. PieChart objects contain Sector objects, which represent the sectors in the pie charts.

XYChart

The XYChart class represents all chart types that have x and y axes except surface charts. Each XYChart object contains a PlotArea object, representing the rectangular region where the chart is actually drawn. A XYChart also contains Axis objects, representing the x and y axes.
The actual chart types in a XYChart are implemented as layers. The available layers are listed below. A XYChart can contain many layers, so combination and custom chart types can easily be created.

Layer | Description
--- | ---
BarLayer | Represent all style of bar layers, such as simple bar layers, multi-bar layers, stacked bar layers, and percentage bar layers.
LineLayer | Represent line layers.
SplineLayer | Represent spline line layers.
StepLineLayer | Represent step line layers.
TrendLayer | Represent trend layers. A trend line or curve is the best fit line or curve computed using the least square method.
InterLineLayer | A layer used for filling regions between two lines. The lines can come from LineLayer, SplineLayer, StepLineLayer, TrendLayer, or from Mark.
ScatterLayer | Represents scatter and bubble layers.
AreaLayer | Represent area layers.
HLOCLayer | Represent high-low-open-close layers.
CandleStickLayer | Represent candlestick layers.
BoxWhiskerLayer | Represent box-whisker layers.
VectorLayer | Represents vector layers.
ContourLayer | Represents contour layers.

The above layers are derived from the Layer class, which represents features common to all layers.
Each chart layer contains one or more DataSet objects. A DataSet object represents a data series. Several chart types require multiple data series, such as high-low-open-close, candlestick and box-whisker charts. Other chart types support combining the data series in various ways. For example, in a bar chart, multiple data series can be combined to form a stacked bar chart, percentage bar chart, multi-bar chart, multi-stacked bar chart, etc.

SurfaceChart

The SurfaceChart class represents surface charts. A surface chart is a 3D chart representing the value of a variable (the z coordinate) over the (x, y) plane.

PolarChart

The PolarChart class represents polar and radar charts. Each PolarChart object contains a RadialAxis and an AngularAxis. The actual chart types in a PolarChart are implemented as layers. A PolarChart can contain many layers, so combination and custom chart types can easily be created.
The available layers are listed below.

Layer | Description
--- | ---
PolarLineLayer | Represent line layers, as well as scatter and bubble layers. (A scatter layer is a line layer with line set to Transparent. A bubble layer is a scatter layer in which the data symbols are of variable sizes.)
PolarAreaLayer | Represent area layers.
PolarSplineLineLayer | Represent spline line layers.
PolarSplineAreaLayer | Represent spline area layers.
PolarVectorLayer | Represent vector layers.

The above layers are derived from the PolarLayer class, which represents features common to all layers.

PyramidChart

The PyramidChart class represents pyramid, cone and funnel charts. PyramidChart objects contain PyramidLayer objects, which represent the layers in the pyramid, cone and funnel charts.

BaseMeter

The BaseMeter class is the base class for all meters. It represents features common to all meters. A BaseMeter object contains MeterPointer objects for representing meter pointers.

AngularMeter

The AngularMeter class represents angular meters, which are meters of which the meter pointers rotate to show the readings.

LinearMeter

The LinearMeter class represents horizontal and vertical linear meters, which are meters of which the meter pointers move linearly to show the readings.

MultiChart

A MultiChart object is a container for combining multiple BaseChart objects into a combined chart object.

FinanceChart

FinanceChart is a financial charting library built on top of the main ChartDirector library. It extends MultiChart by implementing many financial indicators, and allowing complex financial charts to be composed easily.

© 2009 Advanced Software Engineering Limited. All rights reserved.