|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.java4less.rchart.ChartComponent | +--com.java4less.rchart.Axis
The axis is made of:
The line.
The ticks (small and big).
The labels (text displayed next to the big ticks).
Grid.
Example:
// create axis
com.java4less.rchart.Axis XAxis=new Axis(Axis.HORIZONTAL,new Scale());
com.java4less.rchart.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;
Field Summary | |
int |
autoNumberOfTicks
Defautl is 0. |
boolean |
axisFrame
if true, axis lines will be painted on all four sides of the chart. |
int |
bigTickInterval
A value of 5 means that a big tick will be displayed after 4 small ticks. |
int[] |
bigTickIntervalList
list of positions where big ticks should be painted. axis.bigTickIntervalList={1,3,6}; means: paint a big tick after 1, 3 and 6 small ticks |
int |
bigTickPixels
length of the line used to draw big ticks. |
boolean |
bigTicksGrid
if true the grid will be displayed only for the big ticks. |
int |
ceroAxis
displays a cero axis if there are negative values in the chart. |
static int |
CEROAXIS_LINE
|
static int |
CEROAXIS_NO
|
static int |
CEROAXIS_SCALE
|
LineStyle |
ceroAxisStyle
style of the cero axis. |
java.lang.String |
dateLabelFormat
date format for date labels (only if initialDate! |
java.lang.String |
dateStep
date step for ticks (only if initialDate! |
java.awt.Color |
DescColor
Color of the text used to display the labels. |
java.awt.Font |
DescFont
Font of the text used to display the labels. |
LineStyle |
gridStyle
Style of the grid. |
static int |
HORIZONTAL
|
java.util.Date |
initialDate
this date will be used as based if you want to calculate dates for the tick labels. |
boolean |
IntegerScale
if true, the labels will be shown as integer values. |
boolean |
logarithmicIntervals
only if you use logarithmic scales. |
int |
offset
internal use |
int |
orientation
orientation of the axis. |
Axis |
peerAxis
internal use. |
Plotter |
plot
internal use. |
int |
realPosition
internal use |
boolean |
rightAxis
|
Scale |
scale
scale assigned to the axis. |
java.lang.String |
scaleLabelFormat
this format will be used to draw the label. |
double |
scaleTickInterval
A value of 100 means that the ticks will be displayed in intervals of 100. |
boolean |
startWithBigTick
if "true" the first tick in the axis will be a big ticks (with label). |
LineStyle |
style
Style of the axis. |
boolean |
tickAtBase
if true draws the first tick at scale.min. |
int |
tickLabelLength
maximum number of characters per label. |
java.lang.String[] |
tickLabels
Labels display at big ticks. |
int |
tickPixels
length of the line used to draw ticks. |
double[] |
ticks_preferred_Interval
Only used if autoNumberOfTicks<>=0. |
static int |
VERTICAL
|
boolean |
verticalLabels
if true, the labels will be painted as vertical text (you must also set the property Chart.tmpImage). |
int |
visibleSize
internal use |
Fields inherited from class com.java4less.rchart.ChartComponent |
height, width, x, y |
Constructor Summary | |
Axis(int o,
Scale s)
creates an axis with an orientation and scale. |
Method Summary | |
void |
draw(java.awt.Graphics g,
Axis peerAxis,
boolean drawForeGround)
draws the axis. |
void |
drawBackground(java.awt.Graphics g,
Axis peerAxis)
|
void |
drawForeground(java.awt.Graphics g,
Axis peerAxis)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
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 axisFrame
public java.lang.String dateLabelFormat
public java.lang.String dateStep
public java.util.Date initialDate
public int realPosition
public int visibleSize
public int offset
public boolean IntegerScale
public int autoNumberOfTicks
public double[] ticks_preferred_Interval
public java.lang.String scaleLabelFormat
public boolean logarithmicIntervals
public Scale scale
public boolean bigTicksGrid
public double scaleTickInterval
public int bigTickInterval
public int[] bigTickIntervalList
public int tickPixels
public int bigTickPixels
public Plotter plot
public Axis peerAxis
public int ceroAxis
public LineStyle ceroAxisStyle
public boolean tickAtBase
public boolean verticalLabels
public LineStyle style
public LineStyle gridStyle
public int orientation
public boolean rightAxis
public java.awt.Color DescColor
public java.awt.Font DescFont
public java.lang.String[] tickLabels
public boolean startWithBigTick
public int tickLabelLength
Constructor Detail |
public Axis(int o, Scale s)
Method Detail |
public void drawForeground(java.awt.Graphics g, Axis peerAxis)
public void drawBackground(java.awt.Graphics g, Axis peerAxis)
public void draw(java.awt.Graphics g, Axis peerAxis, boolean drawForeGround)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |