org.faceless.graph2
Class MarkerAxis

java.lang.Object
  extended by org.faceless.graph2.Axis
      extended by org.faceless.graph2.BarAxis
          extended by org.faceless.graph2.MarkerAxis

public class MarkerAxis
extends BarAxis

A subclass of Axis which displays Markers 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.


Field Summary
 
Fields inherited from class org.faceless.graph2.Axis
BOTTOM, DENSITY_MINIMAL, DENSITY_NORMAL, DENSITY_SPARSE, LEFT, RIGHT, TOP, ZAXIS
 
Constructor Summary
MarkerAxis(int size)
          Create a new MarkerAxis
 
Method Summary
 void setRotate(int rotate)
          Set the rotation for each marker on the axis
 
Methods inherited from class org.faceless.graph2.BarAxis
format, setOrder, steps
 
Methods inherited from class org.faceless.graph2.Axis
setLabel, setMaxValue, setMinValue, setSpineStyle, setToothLength, setToothTextStyle, setWallPaint, setWallPaint, setZeroIntersection, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MarkerAxis

public MarkerAxis(int size)
Create a new MarkerAxis

Parameters:
size - the size of each Marker
Method Detail

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