Class LineChart

All Implemented Interfaces:
Chart<LineChart,LineOptions,LineData>

public class LineChart extends HomogeneousChart<LineChart,LineOptions,LineData>
  • Constructor Details

    • LineChart

      public LineChart()
    • LineChart

      public LineChart(LineData data)
    • LineChart

      public LineChart(LineData data, LineOptions options)
  • Method Details

    • data

      public static LineData data()
      Static factory, constructs an HomogeneousData implementation appropriate for a LineChart.
      Returns:
      a new LineData instance
    • options

      public static LineOptions options()
      Static factory, constructs an Options implementation appropriate for a LineChart.
      Returns:
      a new LineOptions instance
    • getType

      public String getType()
      Returns:
      type of this Chart implementation for proper drawing in JavaScript.
    • isDrawable

      public boolean isDrawable()

      Optional check to determine whether the current state of this Chart implementation instance will generate a drawable JSON string.

      Implementations provide a best-effort evaluation, and can not guarantee that the serialized chart will be rendered correctly.

      LineChart is drawable if at least one dataset has at least one data point.
      If an xAxisID is set on a dataset, an xAxis scale must exist with that id.
      If an yAxisID is set on a dataset, a yAxis scale must exist with that id.

      Returns:
      true if this Chart is drawable in its current state