com.java4less.rchart
Class MaxMinDataSerie
java.lang.Object
|
+--com.java4less.rchart.DataSerie
|
+--com.java4less.rchart.LineDataSerie
|
+--com.java4less.rchart.MaxMinDataSerie
- public class MaxMinDataSerie
- extends LineDataSerie
This data serie is an extension of LineDataSerie that displayed minimum and maximum values of each element.
Example:
double[] d1={2,1 ,2 ,3 ,4 ,5 ,4 ,3};
double[] dmin1={1.5,0.85 ,1.5 ,2.8 ,3, 4.8 ,3.5,2.5 };
double[] dmax1={2.3,1.15 ,2.5 ,3.2 ,4.4 ,5.3,4.5 ,3.3};
MaxMinDataSerie data1= new MaxMinDataSerie(d1,null);
data1.drawPoint=true;
data1.drawLineEnd=false;
data1.pointColor=java.awt.Color.green;
data1.setMaxMinValues(dmax1,dmin1);
data1.maxminStyle=new LineStyle(0.2f,java.awt.Color.white,LineStyle.LINE_NORMAL);
Field Summary |
boolean |
bubbleChart
if true the max values will be used as radius to draw a bubble chart. |
boolean |
drawLineEnd
if true a "line terminator" will be displayed at the bottom abd top of the min/max line. |
boolean |
fillBubble
if true the bubbles will be solid. |
LineStyle |
maxminStyle
Style of the line used to display the min/max interval. |
java.awt.Color |
negativeValueColor
only CANDLESTICK) Color of when close value < open value. |
int |
openCloseWidth
|
java.awt.Color |
positiveValueColor
(only CANDLESTICK) Color of when close value > open value. |
Constructor Summary |
MaxMinDataSerie(double[] op,
double[] cl,
double[] hi,
double[] lo,
LineStyle s)
Creates a data serie with open values, close values, high (maximum) value and low (minimum) value. |
MaxMinDataSerie(java.lang.Double[] op,
double[] cl,
double[] hi,
double[] lo,
LineStyle s)
|
MaxMinDataSerie(double[] x,
double[] y,
LineStyle s)
|
MaxMinDataSerie(double[] y,
LineStyle s)
|
MaxMinDataSerie(java.lang.Double[] y,
LineStyle s)
|
MaxMinDataSerie(LineStyle s)
|
Method Summary |
void |
addMaxMinData(java.lang.Object max,
java.lang.Object min)
Adds one interval to the serie. |
void |
addOHLCData(java.lang.Object op,
java.lang.Object cl,
java.lang.Object max,
java.lang.Object min)
|
void |
setMaxMinValues(double[] Max,
double[] Min)
Adds the arrays that contains the maximum and minimum value of each element if the serie. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
drawLineEnd
public boolean drawLineEnd
- if true a "line terminator" will be displayed at the bottom abd top of the min/max line.
maxminStyle
public LineStyle maxminStyle
- Style of the line used to display the min/max interval.
bubbleChart
public boolean bubbleChart
- if true the max values will be used as radius to draw a bubble chart. The Min values are not used.
fillBubble
public boolean fillBubble
- if true the bubbles will be solid.
positiveValueColor
public java.awt.Color positiveValueColor
- (only CANDLESTICK) Color of when close value > open value.
negativeValueColor
public java.awt.Color negativeValueColor
- only CANDLESTICK) Color of when close value < open value.
openCloseWidth
public int openCloseWidth
MaxMinDataSerie
public MaxMinDataSerie(LineStyle s)
MaxMinDataSerie
public MaxMinDataSerie(double[] x,
double[] y,
LineStyle s)
MaxMinDataSerie
public MaxMinDataSerie(double[] y,
LineStyle s)
MaxMinDataSerie
public MaxMinDataSerie(java.lang.Double[] y,
LineStyle s)
MaxMinDataSerie
public MaxMinDataSerie(double[] op,
double[] cl,
double[] hi,
double[] lo,
LineStyle s)
- Creates a data serie with open values, close values, high (maximum) value and low (minimum) value. The style will be used to draw the vertical line.
MaxMinDataSerie
public MaxMinDataSerie(java.lang.Double[] op,
double[] cl,
double[] hi,
double[] lo,
LineStyle s)
addOHLCData
public void addOHLCData(java.lang.Object op,
java.lang.Object cl,
java.lang.Object max,
java.lang.Object min)
addMaxMinData
public void addMaxMinData(java.lang.Object max,
java.lang.Object min)
- Adds one interval to the serie.
setMaxMinValues
public void setMaxMinValues(double[] Max,
double[] Min)
- Adds the arrays that contains the maximum and minimum value of each element if the serie.