Interface Chart<SELF,O extends Options<O,?>,D extends Data<D,?>>

All Known Implementing Classes:
AbstractChart, BarChart, BubbleChart, DoughnutChart, LineChart, PieChart, PolarChart, RadarChart, ScatterChart

public interface Chart<SELF,O extends Options<O,?>,D extends Data<D,?>>
  • Method Details

    • getType

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

      String toJsonNative()

      Convert this instance to Json for use with Chart.js library.

      Returns:
      json representation of this Chart
    • toJson

      default String toJson()
      Same as toJsonNative() but also check if the diagram is drawable
      See Also:
    • isDrawable

      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.

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

      SELF setOptions(O options)
    • setData

      SELF setData(D data)