org.faceless.graph2
Class MarkerAxis
java.lang.Object
org.faceless.graph2.Axis
org.faceless.graph2.BarAxis
org.faceless.graph2.MarkerAxis
public class MarkerAxis
- extends BarAxis
A subclass of Axis
which displays Marker
s instead of text on the axis.
It works the same way as a regular axis - it formats and plots a range of numbers along
a spine, and is very similar in concept to a BarAxis
except that the MarkerAxis
formats each number as a Marker
. So, for example, to plot a graph with flags onx
the axis:
Axesgraph graph = new AxesGraph();
BarSeries series = new BarSeries("Fruit by Country");
series.set("flag.US", 10);
series.set("flag.UK", 15);
series.set("flag.AU", 8);
graph.setAxis(new MarkerAxis(20), Axis.BOTTOM);
graph.addSeries(AxesGraph.BOTTOMLEFT, s);
Will result in the graph having a MarkerAxis along the bottom which will plot values
from 0 to 2, formatting 0 as the US flag, 1 as the UK flag and 2 as the Australian flag.
Constructor Summary |
MarkerAxis(int size)
Create a new MarkerAxis |
Method Summary |
void |
setRotate(int rotate)
Set the rotation for each marker on the axis |
MarkerAxis
public MarkerAxis(int size)
- Create a new MarkerAxis
- Parameters:
size
- the size of each Marker
setRotate
public void setRotate(int rotate)
- Set the rotation for each marker on the axis
- Parameters:
rotate
- how much to rotate each marker, in degrees clockwise
Copyright © 2001-2011 Big Faceless Organization