A dual-Y graph is a graph that has two Y-axes. Different series of data are assigned to each axis.
You use dual-Y graphs to show data of different magnitudes on the same graph. For example, for durable goods such as automobiles, you might assign Sales values to one Y-axis and Unit values to the other Y-axis.
The following graph categories have dual-Y graph varieties:
The following varieties of dual-Y graphs are available:
Nonsplit -- Series assigned to the different Y-axes appear side by side. (Not available for area graphs.)
Split -- The plot area is split into two sections, so that series assigned to the different Y-axes appear in different parts of the plot area.
The structure of a dual-Y graph is the same structure as its root graph. The only difference is that some series are assigned to the Y1-axis and other series are assigned to the Y2-axis.
In addition to any requirements for the graph type (such as an area graph, which must have at least two groups of data), dual-Y graphs should have at least two series of data.
The AssignedToY2
attribute of the Series
class specifies whether
the series is plotted against the Y1- or the Y2-axis. When isAssignedToY2
is
returns true
, then the series is assigned to the Y2-axis. When
isAssignedToY2
is returns false
, then the series is assigned to the
Y1-axis.
When you set the graph's type to a dual-Y variety, the graph automatically assigns at least one series to each Y-axis, unless you have already done so.
The following figure shows a dual-Y graph that is populated with one measure (Sales). The series that represent totals are assigned to the Y2-axis.
The following figure shows the same data in a split dual-Y graph. The series that represents Total sales is assigned to the Y2-axis and appears in the bottom half of the graph.
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