All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----MSBChart.ChartComponent | +----MSBChart.Axis
The axis is made of:
Example:
// create axis
MSBChart.Axis XAxis=new Axis(Axis.HORIZONTAL,new Scale());
MSBChart.Axis YAxis=new Axis(Axis.VERTICAL,new Scale());
XAxis.scale.min=0;
YAxis.scale.min=0;
YAxis.scaleTickInterval=1;
XAxis.scaleTickInterval=1;
String[] lbls={"June","July","Aug.","Sept.","Oct.","Nov.","Dec."};
XAxis.tickLabels=lbls;
public static final int HORIZONTAL
public static final int VERTICAL
public static final int CEROAXIS_LINE
public static final int CEROAXIS_NO
public static final int CEROAXIS_SCALE
public boolean IntegerScale
if true the labels will be display as integer values. That's "1" instead of "1.0".
public Scale scale
scale assigned to the axis.
public boolean bigTicksGrid
if true the grid will be displayed only for the big ticks. If false (default) will be displayed for all ticks.
Example of grid:
public int scaleTickInterval
A value of 100 means that the ticks will be displayed in intervals of 100. That's, first tick at scale.min , second at scale.min+100 third at scale.min+200...
public int bigTickInterval
A value of 5 means that a big tick will be displayed after 4 small ticks.
public int tickPixels
length of the line used to draw ticks.
public int bigTickPixels
length of the line used to draw big ticks.
public Plotter plot
internal use.
public Axis peerAxis
internal use.
public int ceroAxis
displays a cero axis if there are negative values in the chart. Valid values are CEROAXIS_NO, CEROAXIS_LINE and CEROAXIS_SCALE.
public LineStyle ceroAxisStyle
style of the cero axis.
public boolean tickAtBase
if true draws the first tick at scale.min. If false at scale.min+ scaleTickInterval.
public LineStyle style
Style of the axis.
public LineStyle gridStyle
Style of the grid. If null (default) no grid is displayed.
public int orientation
orientation of the axis. Valid values are VERTICAL or HORIZONTAL.
public Color DescColor
Color of the text used to display the labels.
public Font DescFont
Font of the text used to display the labels.
public String tickLabels[]
Labels display at big ticks. If null the scale value will be used.
public Axis(int o, Scale s)
creates an axis with an orientation and scale.
public void draw(Graphics g, Axis peerAxis)
draws the axis.
All Packages Class Hierarchy This Package Previous Next Index