com.java4less.rchart
Class LineDataSerie

java.lang.Object
  extended by com.java4less.rchart.DataSerie
      extended by com.java4less.rchart.LineDataSerie
Direct Known Subclasses:
MaxMinDataSerie

public class LineDataSerie
extends DataSerie

A LineDataSerie is a DataSerie that must be plotted using lines.


double[] d1={1,2,3,4,5,4,2};
double[] d2={2,3,4,6,6.4,4.5,6.1};

LineDataSerie data1= new LineDataSerie(d1,new LineStyle(0.2f,GraphicsProvider.getColor(ChartColor.BLUE),LineStyle.LINE_DOTS));
data1.drawPoint=true;
data1.icon=im1; // assignes image for the point

LineDataSerie data2= new LineDataSerie(d2,new LineStyle(0.2f,GraphicsProvider.getColor(ChartColor.GREEN),LineStyle.LINE_DOTS));
data2.drawPoint=true;
data2.icon=im2; // assignes an image for the point


Field Summary
 boolean drawPoint
          if true a point will be displayed for each vakue of the serie.
 FillStyle fillStyle
          fill style used for area charts.
 ChartImage icon
          image used to draw the point of the serie.
 int lineType
          select line type.
 ChartColor pointColor
          color of the point
static int startingXValue
          starting point for x values if they are not prvided
 LineStyle style
          style of the line for this serie.
 ChartColor valueColor
          color used to draw the values of the serie.
 ChartFont valueFont
          font used to draw the values of the serie.
 LineStyle vstyle
          style of the vertical line from the point to the x axis,
 
Fields inherited from class com.java4less.rchart.DataSerie
dataLabels, hotAreas, htmlLinks, labelTemplate, name, nullValue, secondaryXAxis, secondaryYAxis, secondYAxis, tips, valueFormat
 
Constructor Summary
LineDataSerie(double[] x, double[] y, LineStyle s)
           
LineDataSerie(java.lang.Double[] x, java.lang.Double[] y, LineStyle s)
           
LineDataSerie(double[] y, LineStyle s)
           
LineDataSerie(java.lang.Double[] y, LineStyle s)
           
LineDataSerie(LineStyle s)
           
 
Method Summary
 
Methods inherited from class com.java4less.rchart.DataSerie
addData, getElementX, getElementY, getSize, replaceXValueAt, replaceXYValueAt, replaceYValueAt, setDatax
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

style

public LineStyle style
style of the line for this serie.


vstyle

public LineStyle vstyle
style of the vertical line from the point to the x axis,


icon

public ChartImage icon
image used to draw the point of the serie.


valueColor

public ChartColor valueColor
color used to draw the values of the serie.


valueFont

public ChartFont valueFont
font used to draw the values of the serie.


drawPoint

public boolean drawPoint
if true a point will be displayed for each vakue of the serie.


pointColor

public ChartColor pointColor
color of the point


fillStyle

public FillStyle fillStyle
fill style used for area charts.


startingXValue

public static int startingXValue
starting point for x values if they are not prvided


lineType

public int lineType
select line type. The default is TYPE_LINE. Other values (TYPE_CUBIC_NATURAL,TYPE_B_SPLINES ) requiere the use of the curvePlotter.

Constructor Detail

LineDataSerie

public LineDataSerie(LineStyle s)

LineDataSerie

public LineDataSerie(double[] x,
                     double[] y,
                     LineStyle s)

LineDataSerie

public LineDataSerie(java.lang.Double[] x,
                     java.lang.Double[] y,
                     LineStyle s)

LineDataSerie

public LineDataSerie(java.lang.Double[] y,
                     LineStyle s)

LineDataSerie

public LineDataSerie(double[] y,
                     LineStyle s)