An area graph is a graph in which data is represented as a filled-in area.
Use area graphs to show the following aspects of data:
Trends over time, such as sales for the last 12 months
Rate of data change, such as how fast the market share is increasing
Percentage or changes in percentage, such as how much revenue comes from each product line, or whether last year's big seller provides the same percentage of revenue as it did last year at this time
Relationship of parts to the whole, such as which products' sales are most closely related to total sales, or which products' sales follow the trend of total sales
Changes in all parts of a whole, such as the rate of revenue growth for all products in the fastest growing division
The following types of area graphs are available:
Absolute area graph -- Each area marker reflects the data values in the column.
Stacked area graph -- Area markers are "stacked": the values of each series are added to the values for previous series. The size of the stack represents a cumulative total.
Percentage area graph -- Area markers show the series percentage of the cumulative total of all series.
These types can also have the following axis arrangements:
Single Y-axis -- Uses a single Y-axis.
Split dual Y-axis -- Splits the plot area into two graphs with independently scaled Y-axes.
The following table shows which of the axis arrangements are available for the different area graph types.
Single Y Axis |
Split Dual Y-Axis |
---|---|
Absolute: |
Absolute: |
Stacked: |
Stacked: |
Percentage: |
NA |
The DepthRadius
and DepthAngle
properties of the
Graph
object together specify whether an area graph appears to
have depth.
The following figure shows the data structure of a stacked area graph.
The structure of an area graph is as follows:
A group is represented by a position along the O1-axis that runs through all area markers and is labeled by an O1 tick label, such as Feb.
A series is represented by an area marker and is labeled by legend text, such as Americas.
Area graph data has the following guidelines:
Graphs display numeric data only.
Area graphs must have at least two groups of data. If you pass only one group of data, then the Graph bean displays a message about insufficient data, instead of displaying a graph.
Percentage area graphs cannot have negative numbers. If you pass negative
numbers to a percentage graph, then the graph sends an AlertEvent
to any AlertListeners
that have been registered. The ID of
the alert event is either DATA_ALL_DATA_NULL_NEG_ZERO
or DATA_PARTIAL_DATA_NULL_NEG_ZERO
.
Time axis data must be regular, complete, and in ascending order. If it is not, then the graph displays a regular ordinal axis rather than a time axis.
Handling Problems
in Graph Data
Specifying Data for a Graph
Example: Setting JDBC Data on
a Simple Graph
Example: Setting Data from a
File on a Simple Graph