All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.awt.Component | +----java.awt.Canvas | +----MSBChart.Chart
Main class of RChart, it links everythings together; axis, plotter, legend, title... RChart calculates the position and size of all the components and calls the draw method of all of them.
Chart is an extension of Canvas so you can put it on your frames, windows, etc...
public static final int LAYOUT_LEGEND_RIGHT
public static final int LAYOUT_LEGEND_TOP
public static final int LAYOUT_LEGEND_BOTTOM
public VAxisLabel YLabel
Label to be displayed along the Y axis.
public HAxisLabel XLabel
Label to be displayed along the X axis.
public Legend legend
public Axis XAxis
public Axis YAxis
public Title title
public double bottomMargin
area reserved for the x axis. The default is 0.1 (10%).
public double topMargin
area reserved for the title. The default is 0.1 (10%).
public double leftMargin
area reserved for the y axis. The default is 0.1 (10%).
public double legendMargin
area reserved for the legend. The default is 0.1 (10%).
public double axisMargin
public boolean autoSize
if true (default) the position and size of the components will be calculated automatically. If not you must assign a value to the fields x,y,width and height of ChartComponent.
public Plotter Plotters[]
public int layout
position of the legend in the chart. Valid values are LAYOUT_LEGEND_TOP,LAYOUT_LEGEND_BOTTOM and LAYOUT_LEGEND_RIGHT (default).
public FillStyle back
background of the chart.
public LineStyle border
border of the chart.
public Chart(Title t, Plotter p, Axis X, Axis Y)
creates a chart for the specified components. X and Y will be null for a PiePlotter.
public void addPlotter(Plotter p)
adds an extra plotter to the chart. In this way it is possible to combine bar charts and line charts.
public void addSerie(DataSerie s)
adds a serie to the plotter (the one used in the constructor). This method just calls the addSerie method od the plotter, so you can call the plotter's method directly.
public void paint(Graphics g)
All Packages Class Hierarchy This Package Previous Next Index