<axesgraph width="200" height="200"> <axis pos="left" type="currency" /> ... </axesgraph>
<axesgraph width="200" height="200"> <axis pos="left" type="log(integer, 10)" min="0" max="100000" /> ... </axesgraph>
<axesgraph width="200" height="200"> <axis pos="bottom" type="bar" rotate="45" align="left top" paddingtop="2" /> <axis pos="z" type="zaxis" /> ... </axesgraph>
type | String | mandatory | XML / Tag Library |
int | Integer values |
---|---|
float | Real values |
currency | Currency values in the default Locale |
date | Date values in the format "dd-MMM-yyyy" |
decimal(format) | Numeric values. format is a string that will be passed in to the constructor of the DecimalFormat class, eg decimal(#0.00%) |
currency(code) | Currency values in the specified Locale, eg currency(US) . The exact format depends on the locale |
date(format) | Date values. format is a string that will be passed in to the constructor of the DateFormat class, eg date(yyyy-MM) |
bar | Bar values. The default on the X axis when plotting bars |
null | a Null axis, for plotting no values at all. |
zaxis | This and null are the only acceptable values when pos="z". |
log(axis[,base]) | A "wrapper" around another axis to plot logarithmic values, eg log(int) to plot base-10 integer values, log(currency(US), 2) to plot base-2 USD amounts or log(float, E) to plot floats with a natural log base. The base is optional and if not specified defaults to "10" |
gap(axis, min, max[, size]) | A "wrapper" which puts gaps in another axis. For example to plot values from 0 to 50, have a gap to 200 and then plot values to 250, try gap(int, 50, 200) . As with the log axis, axis can be any type of axis (you could conceivably have gap(gap(int, 50, 200), 300, 500) ). The optional size parameter is the size of the "gap marker", which may be any integer from 0 to 50. |
constructor | To use a custom subclass of Axis , you can specify a constructor here, complete with arguments (which may be doubles, floats, ints, booleans, chars or Strings). For instance, if you have a subclass of Axis called "com.yourcompany.MyAxis" with a constructor like MyAxis(String foo, double bar) , you could specify <axis pos="left" type="com.yourcompany.MyAxis(Some Text, 1.0)" /> |
pos | top | left | bottom | right | z | mandatory | XML / Tag Library |
min | Real or Date | optional | XML / Tag Library |
max | Real or Date | optional | XML / Tag Library |
wallpaint | Paint | optional | XML / Tag Library |
stripe(Paint* [, line=Color])
to paint the wall in
alternating stripes, with an option line between then.
<axis pos="left" type="int" wallpaint="#E0E0E0">...</axis>
<axis pos="left" type="int" wallpaint="stripe(yellow,gray)">...</axis>
<axis pos="left" type="int" wallpaint="stripe(line=gray)">...</axis>
zerointersection | Boolean | optional | XML / Tag Library |
fit | expand | contract | exact | exact-round | exact-expand | exact-contract | optional | XML / Tag Library |
stretchends | Boolean | optional | XML / Tag Library |
min
and max
attributes can be set.
barwidth | Integer | optional | XML / Tag Library |
barsatnoon | Boolean | optional | XML / Tag Library |
density | normal | sparse | minimal | optional | XML / Tag Library |
toothlength | Real >= 0 | optional | XML / Tag Library |
textcolor | Paint | optional | XML / Tag Library |
padding | Integer[1..4] | optional | XML / Tag Library |
paddingleft | Integer | optional | XML / Tag Library |
paddingright | Integer | optional | XML / Tag Library |
paddingbottom | Integer | optional | XML / Tag Library |
paddingtop | Integer | optional | XML / Tag Library |
fontsize | Real > 0 | optional | XML / Tag Library |
font | String | optional | XML / Tag Library |
font="12pt bold Times"
is
the same as fontfamily="Times" fontweight="bold" fontsize="12pt"
.
fontfamily | String | optional | XML / Tag Library |
<bfg:axesgraph> <label fontfamily="serif">My Label</label> ... </bfg:axesgraph>
<bfg:font name="myfont" src="http://localhost/myfont.ttf" /> <bfg:axesgraph> <label fontfamily="myfont">My Label</label> ... </bfg:axesgraph>
fontweight | normal | bold | optional | XML / Tag Library |
fontstyle | normal | italic | optional | XML / Tag Library |
align | box? (top | middle | bottom) (left | center | right) | optional | XML / Tag Library |
align="center"
(the vertical alignment
is undefined). To align horizontally and vertically, do align="center middle"
.
As in HTML, "middle" refers to vertical alignment and "center" refers to horizontal.
The special value "box" can be used in an <axes> to require all the items in the
axis are aligned as a group, rather than individually.
rotate | Real | optional | XML / Tag Library |
color | Paint | optional | XML / Tag Library |
bordercolor | Color | optional | XML / Tag Library |
linethickness | Real > 0 | optional | XML / Tag Library |
dash | Real[] | optional | XML / Tag Library |
dash="5,5"
to create a regular dash pattern,
or dash="6,2,2,2"
to create a dash/dot type pattern.