|
Home / .NET
Products / Charting Quick
Overview
Charting Quick Overview
1 Overview
This document provides a quick overview of the Graphics
Server's .Net Charting engine. The
following sections will discuss the high level architecture of the various
components within the Charting engine and the areas of the engine that are
extensible.
2 Chart Object
The Graphics Server charting engine is completely encapsulated
within the Chart object. The
diagram below shows a high level view of the Chart object, the major components
inside the Chart object and some of the major method calls supported by the
Chart object.
The innovation to notice here is that the charting engine is
built independent of any Win Form or Web Form user interface control. This
design provides the application developer the flexibility to attach the Chart
object to any design or viewing surface their architecture requires.
3 Win and Web Form Control Wrappers (i.e. User Controls)
Many .Net developers do not require the flexibility the
architecture allows via the stand alone Chart object. These
developers simply want to drop a chart on a windows form or a web form, bind to
some data and quickly set some properties. Graphics
Server provides developers with two custom controls for this purpose, one for
windows forms and one for web forms.
The simple diagram below shows how Graphics Server utilizes
the Charting engine architecture by wrapping the Chart Object inside both of
the mentioned custom controls.

The diagram also illustrates that the Chart Object can be
easily wrapped by a 3rd Party user to fulfill any special development needs
that their application requires.
4 Connecting Data to the Chart
Graphics Server has designed a flexible Charting Engine
Architecture. But where and how
does the chart engine access data? An
equally flexible and robust Series Data Architecture has been implemented to
provide the chart engine with data. The
high level diagram below illustrates the Series Data Architecture and how it
hooks into the Charting Engine Architecture. The
following sub sections describe this diagram in more detail.
4.1 Data Provider Layer
Graphics Server provides a set of well defined .Net interfaces
that describe the concept of a Data Provider. The
current charting product contains several Data Provider implementations with
more to come in the future.
By creating a set of well defined .Net interfaces for the Data
Provider layer, Graphics Server has provided the user with the ability to
extend this layer and create their own custom Data Providers for direct access
to their data.
This is very useful when the 3rd party's data store does not quite fit into one of the provided
Data Provider mechanisms.

Note also that each Data Provider object is a stand alone
object. In other words a user can
instantiate one of these objects and use it outside of the charting
architecture to access data simply by calling the various methods provided in
the well defined set of interfaces.
4.2 Series Object
The Series object provides the glue between the chart engine
and the data provider layer. As
the name implies this object represents the data for a single charting series.
Only the data is represented by this object and not any properties that dictate how the series
draws when placed in a chart.
The concept of the series drawing properties will be discussed later.
A Series object is essentially empty until data is attached to
one or more of the components within the Series. The
diagram below shows the X component attached to a Dataset Data Provider and the
Y component attached to a OleDb Data Provider. The
Series Component concept will be discussed in more detail below.

When a Series Component is attached to a Data Provider it must
be attached to a specified field source within that Data Provider. For
example, if there is Dataset that contains a table called Employee you might
want to graph the salary (i.e. the salary field would be the field source) of
all the employees. This would be
accomplished by placing the Dataset into a DataSetDataProvider, creating a
Series object and attaching the Y component of the Series object to the salary
field source within the DataSetDataProvider.
The diagram above also shows that different components in a
Series object can be attached to different Data Provider objects (which may or
may not be of the same Data Provider type). Also
shown in the diagram is a case where different components in a Series object
are attached to different field sources in the same Data Provider.
The diagram below shows yet another variation where different
Series objects can feed from the same Data Provider using different field
sources. This scenario even works
if both Series are accessing the same exact field source (not pictured).
There are of course other variations of connecting Data
Providers to Series Components that have not been mentioned. These
variations are left to the imagination of the user.
4.3 Series Component
What exactly is a Series Component and why do they exist? The
following is a list of the Series Component types that exist in a Series:
| X |
x-axis component |
| Y |
y-axis component |
| Z |
z-axis component |
| Angle |
angular component of a polar coordinate (theta) |
| Radius |
radial component of a polar coordinate or radius value for Bubble series |
| Open |
opening value over a given interval |
| High |
high value over a given interval |
| Low |
low value over a given interval |
| Close |
closing value over a given interval |
| Label |
string that can be used to label an axis |
Attaching data to a component or components in a Series
defines which chart types can render that Series once the Series is attached to
a Chart object.
For example, if a Series object contains the Y Component only (meaning data has been attached to
the Y Component) then many of the line, bar and scatter chart types will be
able to render that Series.
However, the Bubble chart type will not be able to render the Series because it requires data to
be attached to the Radius Component along with the Y Component. The
High/Low chart type for graphing financial data will not be able to render the
Series because that chart requires the High, Low, Open and Close components
(see the help documentation concerning each chart type and the required
components).
This may seem like a limitation but note that the following
diagram shows a valid scenario.

This scenario shows a Series object that contains multiple
components. This configuration
above allows a series object to be rendered by many more chart types if such a
requirement existed in an application.
4.4 Attaching the Series Object to the Chart Object
Now that the Series Object has been created and contains
components which are attached to data, the Series Object can be attached to a
Chart Object.
The picture above shows two Chart Objects. One
chart has three attached Series Objects and the other chart has two attached
Series Objects.
Note that both Chart Objects share a common Series Object.
Since the Series Object and the Chart Object are both stand alone objects it is valid to share a
Series Object among many Chart Objects.
A great example for sharing the same Series Object between
many charts is a situation where the user wants to view the same data as four
different chart types simultaneously on the same form.
4.5 Series Drawing Object
Note that when a Series Object is attached to a Chart Object,
the series is wrapped inside a Series Drawing Object and placed into the
chart's Series Drawing Collection. The
Series Drawing Object contains the properties that control how the series
renders in the chart.
For example, if a series is attached to two different charts
then that series can be displayed as a green bar in one chart and as a red line
in the other chart.
The Series Drawing object has a large and robust collection of properties. Please consult
the help documentation for more information on this subject.
|