com.jpowered.vbgraph
Class Graphdata
java.lang.Object
|
+--com.jpowered.vbgraph.Graphdata
- All Implemented Interfaces:
- java.io.Serializable
- public class Graphdata
- extends java.lang.Object
- implements java.io.Serializable
The Graph Data object allows data to be supplied to the Vertical Bar Graph in java.util.Vector form.
(the alternative method is to utilise the Dataobject class @see com.jpowered.vbgraph.Dataobject)
The following code demostrates how to create a graph data vector with 3 series of data each containing 4 data points:-
Vector bardata = new Vector();
bardata.add(new Graphdata(1,1,34000));
bardata.add(new Graphdata(1,2,34900));
bardata.add(new Graphdata(1,3,46000));
bardata.add(new Graphdata(1,4,27600));
bardata.add(new Graphdata(2,1,24000));
bardata.add(new Graphdata(2,2,24900));
bardata.add(new Graphdata(2,3,22000));
bardata.add(new Graphdata(2,4,26600));
bardata.add(new Graphdata(3,1,14100));
bardata.add(new Graphdata(3,2,54900));
bardata.add(new Graphdata(3,3,36650));
bardata.add(new Graphdata(3,4,36650));
Each Graphdata object contains 3 elements:-
- Series Number
- Data Number within the series
- Data Value
The Graph Data Vector is then added to the Vertical Bar Graph bean with via the method:-
setData(Vector vector)
- See Also:
VerticalBarGraph
, Serialized Form
Constructor Summary |
Graphdata(int seriesnum,
int datanum,
double value)
Creates a Graph Data Object
Each Graph Data Object represents one bar on the graph display (ie. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Graphdata
public Graphdata(int seriesnum,
int datanum,
double value)
- Creates a Graph Data Object
Each Graph Data Object represents one bar on the graph display (ie. one data element)
- Parameters:
int
- seriesnum - specifying the series which this data point belongsint
- datanum - specifying the data number within the seriesdouble
- value - the value for this data point