org.achartengine.chart
Class TimeChart

java.lang.Object
  extended by org.achartengine.chart.AbstractChart
      extended by org.achartengine.chart.XYChart
          extended by org.achartengine.chart.LineChart
              extended by org.achartengine.chart.TimeChart
All Implemented Interfaces:
java.io.Serializable

public class TimeChart
extends LineChart

The time chart rendering class.

See Also:
Serialized Form

Field Summary
static long DAY
          The number of milliseconds in a day.
static java.lang.String TYPE
          The constant to identify this chart type.
 
Fields inherited from class org.achartengine.chart.XYChart
mDataset, mRenderer
 
Constructor Summary
TimeChart(XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer)
          Builds a new time chart instance.
 
Method Summary
protected  void drawXLabels(java.util.List<java.lang.Double> xLabels, java.lang.Double[] xTextLabelLocations, android.graphics.Canvas canvas, android.graphics.Paint paint, int left, int top, int bottom, double xPixelsPerUnit, double minX, double maxX)
          The graphical representation of the labels on the X axis.
 java.lang.String getChartType()
          Returns the chart type identifier.
 java.lang.String getDateFormat()
          Returns the date format pattern to be used for formatting the X axis labels.
protected  java.util.List<java.lang.Double> getXLabels(double min, double max, int count)
           
 void setDateFormat(java.lang.String format)
          Sets the date format pattern to be used for formatting the X axis labels.
 
Methods inherited from class org.achartengine.chart.LineChart
clickableAreasForPoints, drawLegendShape, drawSeries, getLegendShapeWidth, getPointsChart, isRenderPoints, setDatasetRenderer
 
Methods inherited from class org.achartengine.chart.XYChart
draw, drawChartValuesText, drawSeries, drawText, drawXTextLabels, drawYLabels, getCalcRange, getDataset, getDefaultMinimum, getRenderer, getScreenR, getSeriesAndPointForScreenCoordinate, getYLabels, isRenderNullValues, setCalcRange, setScreenR, toRealPoint, toRealPoint, toScreenPoint, toScreenPoint
 
Methods inherited from class org.achartengine.chart.AbstractChart
drawBackground, drawLabel, drawLegend, drawPath, drawPath, drawString, getExceed, getLabel, getLegendSize, isNullValue, isVertical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final java.lang.String TYPE
The constant to identify this chart type.

See Also:
Constant Field Values

DAY

public static final long DAY
The number of milliseconds in a day.

See Also:
Constant Field Values
Constructor Detail

TimeChart

public TimeChart(XYMultipleSeriesDataset dataset,
                 XYMultipleSeriesRenderer renderer)
Builds a new time chart instance.

Parameters:
dataset - the multiple series dataset
renderer - the multiple series renderer
Method Detail

getDateFormat

public java.lang.String getDateFormat()
Returns the date format pattern to be used for formatting the X axis labels.

Returns:
the date format pattern for the X axis labels

setDateFormat

public void setDateFormat(java.lang.String format)
Sets the date format pattern to be used for formatting the X axis labels.

Parameters:
format - the date format pattern for the X axis labels. If null, an appropriate default format will be used.

drawXLabels

protected void drawXLabels(java.util.List<java.lang.Double> xLabels,
                           java.lang.Double[] xTextLabelLocations,
                           android.graphics.Canvas canvas,
                           android.graphics.Paint paint,
                           int left,
                           int top,
                           int bottom,
                           double xPixelsPerUnit,
                           double minX,
                           double maxX)
The graphical representation of the labels on the X axis.

Overrides:
drawXLabels in class XYChart
Parameters:
xLabels - the X labels values
xTextLabelLocations - the X text label locations
canvas - the canvas to paint to
paint - the paint to be used for drawing
left - the left value of the labels area
top - the top value of the labels area
bottom - the bottom value of the labels area
xPixelsPerUnit - the amount of pixels per one unit in the chart labels
minX - the minimum value on the X axis in the chart
maxX - the maximum value on the X axis in the chart

getChartType

public java.lang.String getChartType()
Returns the chart type identifier.

Overrides:
getChartType in class LineChart
Returns:
the chart type

getXLabels

protected java.util.List<java.lang.Double> getXLabels(double min,
                                                      double max,
                                                      int count)
Overrides:
getXLabels in class XYChart


Copyright © 2009 - 2011 4ViewSoft. All Rights Reserved.