|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.comrom.chart.ChartComponent
net.comrom.chart.Axis
Axis is made of:
! The line
2 The ticks (small and big)
3 The labels (text displayed next to the big ticks)
4 Grid
5 Scale
Example:
// create 2 axis with scale and orientation
XAxis=new Axis(Axis.HORIZONTAL,new Scale());
YAxis=new Axis(Axis.VERTICAL,new Scale());
// set scale values
XAxis.scale.min=0;
YAxis.scale.min=0;
// set the tick configuration
Axis.scaleTickInterval=1;
XAxis.scaleTickInterval=1;
// add user defined labels
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. |
static int |
BAR_STYLE_BAR
|
static int |
BAR_STYLE_NONE
|
static int |
BAR_STYLE_RAISED_BAR
|
FillStyle |
barFilling
filling of the axis if its barstyle is not NONE |
int |
barStyle
style of the axis regular or bars |
int |
barWidth
width of the axis bar if style is not regular |
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
no line at value 0 of the scale |
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! |
boolean |
dateStepPerUnit
if true, the value of dateStep will define the step for each unit of the axis |
ChartColor |
DescColor
Color of the text used to display the labels. |
ChartFont |
DescFont
Font of the text used to display the labels. |
FillStyle |
gridFillStyle
|
LineStyle |
gridStyle
|
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 |
java.lang.String |
label
|
java.lang.String |
labelTemplate
template for the ChartLabel object using the @ tags |
boolean |
logarithmicIntervals
only if you use logarithmic scales. |
int |
orientation
orientation of the axis |
Axis |
peerAxis
|
Plotter |
plot
|
int |
rotateLabels
rotation angle of the labels |
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 |
stackAdditionalAxis
place the axis next to each other or stack them to create several charts on the top/next to the other? |
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
|
java.lang.String[] |
tickLabels
|
int |
tickPixels
|
double[] |
ticks_preferred_Interval
|
static int |
VERTICAL
|
boolean |
xscaleOnTop
X Axis should be painted o the top of the chart instead of the bottom which is the default |
| Fields inherited from class net.comrom.chart.ChartComponent |
height, width, x, y |
| Constructor Summary | |
Axis(int o,
Scale s)
creates an axis with an orientation and scale. |
|
| Method Summary | |
void |
addAdditionalAxis(Axis axis)
add an additional axis to this axis |
void |
addTargetZone(AxisTargetZone zone)
add new targe zone |
static double |
convertFromDate(java.util.Date d,
java.lang.String dateStep,
java.util.Date initialDate)
|
void |
draw(ChartGraphics g,
Axis peerAxis,
boolean drawForeGround,
boolean drawGridBackground)
|
AxisTargetZone[] |
getTargetZones()
|
void |
removeTargetZones()
|
| 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 static final int BAR_STYLE_NONE
public static final int BAR_STYLE_BAR
public static final int BAR_STYLE_RAISED_BAR
public java.lang.String label
public int barStyle
public int barWidth
public FillStyle barFilling
public boolean xscaleOnTop
public boolean axisFrame
public java.lang.String dateLabelFormat
public java.lang.String dateStep
public boolean dateStepPerUnit
public java.util.Date initialDate
public boolean IntegerScale
public int autoNumberOfTicks
public double[] ticks_preferred_Interval
public java.lang.String scaleLabelFormat
public java.lang.String labelTemplate
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 int rotateLabels
public LineStyle style
public LineStyle gridStyle
public FillStyle gridFillStyle
public int orientation
public ChartColor DescColor
public ChartFont DescFont
public java.lang.String[] tickLabels
public boolean startWithBigTick
public int tickLabelLength
public boolean stackAdditionalAxis
| Constructor Detail |
public Axis(int o,
Scale s)
| Method Detail |
public void addAdditionalAxis(Axis axis)
public static double convertFromDate(java.util.Date d,
java.lang.String dateStep,
java.util.Date initialDate)
d - dateStep - initialDate -
public void addTargetZone(AxisTargetZone zone)
public void removeTargetZones()
public AxisTargetZone[] getTargetZones()
public void draw(ChartGraphics g,
Axis peerAxis,
boolean drawForeGround,
boolean drawGridBackground)
g - peerAxis - drawForeGround -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||