Package 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 ofAxis
which displaysMarker
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 aBarAxis
except that the MarkerAxis formats each number as aMarker
. 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.
-
-
Field Summary
-
Fields inherited from class org.faceless.graph2.Axis
BOTTOM, DENSITY_MINIMAL, DENSITY_NORMAL, DENSITY_SPARSE, LEFT, RIGHT, TOP, ZAXIS
-
-
Constructor Summary
Constructors Constructor Description MarkerAxis(int size)
Create a new MarkerAxis
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setRotate(int rotate)
Set the rotation for each marker on the axis-
Methods inherited from class org.faceless.graph2.Axis
setLabel, setMaxValue, setMinValue, setSpineStyle, setToothLength, setToothTextStyle, setWallPaint, setWallPaint, setWallPaint, setZeroIntersection, toString
-
-