public class TimeChart extends LineChart
Modifier and Type | Field and Description |
---|---|
static long |
DAY
The number of milliseconds in a day.
|
static String |
TYPE
/** The constant to identify this chart type.
|
Constructor and Description |
---|
TimeChart(XYMultipleSeriesDataset dataset,
XYMultipleSeriesRenderer renderer)
Builds a new time chart instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawXLabels(List<Double> xLabels,
Double[] xTextLabelLocations,
Canvas canvas,
Paint paint,
int left,
int top,
int bottom,
double xPixelsPerUnit,
double minX,
double maxX)
The graphical representation of the labels on the X axis.
|
String |
getChartType()
Returns the chart type identifier.
|
String |
getDateFormat()
Returns the date format pattern to be used for formatting the X axis
labels.
|
protected List<Double> |
getXLabels(double min,
double max,
int count) |
void |
setDateFormat(String format)
Sets the date format pattern to be used for formatting the X axis labels.
|
clickableAreasForPoints, drawLegendShape, drawSeries, getLegendShapeWidth, getPointsChart, isRenderPoints, setDatasetRenderer
draw, drawChartValuesText, drawPoints, drawSeries, drawText, drawXTextLabels, drawYLabels, getCalcRange, getDataset, getDefaultMinimum, getRenderer, getScreenR, getSeriesAndPointForScreenCoordinate, getYLabels, isRenderNullValues, setCalcRange, setScreenR, toRealPoint, toRealPoint, toScreenPoint, toScreenPoint
drawBackground, drawLabel, drawLegend, drawPath, drawPath, drawString, getExceed, getLabel, getLegendSize, isNullValue, isVertical
public static final String TYPE
public static final long DAY
public TimeChart(XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer)
dataset
- the multiple series datasetrenderer
- the multiple series rendererpublic String getDateFormat()
public void setDateFormat(String format)
format
- the date format pattern for the X axis labels. If null, an
appropriate default format will be used.protected void drawXLabels(List<Double> xLabels, Double[] xTextLabelLocations, Canvas canvas, Paint paint, int left, int top, int bottom, double xPixelsPerUnit, double minX, double maxX)
drawXLabels
in class XYChart
xLabels
- the X labels valuesxTextLabelLocations
- the X text label locationscanvas
- the canvas to paint topaint
- the paint to be used for drawingleft
- the left value of the labels areatop
- the top value of the labels areabottom
- the bottom value of the labels areaxPixelsPerUnit
- the amount of pixels per one unit in the chart labelsminX
- the minimum value on the X axis in the chartmaxX
- the maximum value on the X axis in the chartpublic String getChartType()
getChartType
in class LineChart
protected List<Double> getXLabels(double min, double max, int count)
getXLabels
in class XYChart