# Class TimeSeries

java.lang.Object
com.codename1.charts.models.XYSeries
com.codename1.charts.models.TimeSeries

public class TimeSeries extends XYSeries
A series for the date / time charts.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TimeSeries(String title)`
  Builds a new date / time series.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(Date x, double y)`
  Adds a new value to the series.
  `protected double`
  `getPadding(double x)`

  ### Methods inherited from class XYSeries

  `add, add, addAnnotation, addAnnotation, clear, clearAnnotations, clearSeriesValues, getAnnotationAt, getAnnotationCount, getAnnotationX, getAnnotationY, getIndexForKey, getItemCount, getMaxX, getMaxY, getMinX, getMinY, getRange, getScaleNumber, getTitle, getX, getXYMap, getY, remove, removeAnnotation, setTitle`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TimeSeries

    public TimeSeries(String title)

    Builds a new date / time series.

    ###### Parameters

    - `title`: the series title

- ## Method Details

  - ### add

    public void add(Date x, double y)

    Adds a new value to the series.

    ###### Parameters

    - `x`: the date / time value for the X axis

    - `y`: the value for the Y axis

  - ### getPadding

    protected double getPadding(double x)
    Overrides:
      `getPadding` in class `XYSeries`