|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.chart.Plot | +--com.jrefinery.chart.XYPlot | +--com.jrefinery.chart.OverlaidXYPlot
An extension of XYPlot that allows multiple XYPlots to be overlaid in one space, using common axes.
Fields inherited from interface com.jrefinery.chart.AxisConstants |
DEFAULT_AXIS_LABEL_FONT, DEFAULT_AXIS_LABEL_INSETS, DEFAULT_AXIS_LABEL_PAINT, DEFAULT_TICK_LABEL_FONT, DEFAULT_TICK_LABEL_INSETS, DEFAULT_TICK_LABEL_PAINT, DEFAULT_TICK_PAINT, DEFAULT_TICK_STROKE |
Constructor Summary | |
OverlaidXYPlot(java.lang.String domainAxisLabel,
java.lang.String rangeAxisLabel)
Constructs a new overlaid XY plot. |
|
OverlaidXYPlot(ValueAxis domain,
ValueAxis range)
Constructs an OverlaidXYPlot. |
Method Summary | |
void |
add(XYPlot subplot)
Adds a subplot. |
Range |
getHorizontalDataRange()
Returns the horizontal (x-axis) data range. |
java.util.List |
getLegendItemLabels()
Deprecated. use getLegendItems. |
LegendItemCollection |
getLegendItems()
Returns a collection of legend items for the overlaid plot. |
java.lang.String |
getPlotType()
Returns a string representing the plot type. |
int |
getSeriesCount()
Returns the number of series in this plot. |
Range |
getVerticalDataRange()
Returns the vertical (y-axis) data range. |
void |
render(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
ChartRenderingInfo info,
CrosshairInfo crosshairInfo)
Renders the subplots. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OverlaidXYPlot(java.lang.String domainAxisLabel, java.lang.String rangeAxisLabel)
After creating a new OverlaidXYPlot, you need to add some subplots.
No dataset is required, because each of the subplots maintains its own dataset.
This constructor is provided for convenience. If you need greater control over the axes, use another constructor.
domainAxisLabel
- the label for the domain axis.rangeAxisLabel
- the label for the range axis.public OverlaidXYPlot(ValueAxis domain, ValueAxis range)
domain
- horizontal axis to use for all sub-plots.range
- vertical axis to use for all sub-plots.Method Detail |
public void add(XYPlot subplot)
This method sets the axes of the subplot to null.
subplot
- the subplot.public LegendItemCollection getLegendItems()
getLegendItems
in class XYPlot
public void render(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, ChartRenderingInfo info, CrosshairInfo crosshairInfo)
The draw(...) method inherited from XYPlot takes care of all the setup (background and axes) then calls the render(...) method.
render
in class XYPlot
g2
- the graphics device.dataArea
- the area inside the axes.info
- optional information collection.crosshairInfo
- collects information about crosshairs.public java.lang.String getPlotType()
getPlotType
in class XYPlot
public Range getHorizontalDataRange()
getHorizontalDataRange
in class XYPlot
public Range getVerticalDataRange()
getVerticalDataRange
in class XYPlot
public int getSeriesCount()
getSeriesCount
in class XYPlot
public java.util.List getLegendItemLabels()
getLegendItemLabels
in class XYPlot
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |