Class ChartModel.DataPoint

  • Enclosing class:
    ChartModel

    public class ChartModel.DataPoint
    extends Object
    A class of data point.
    • Constructor Detail

      • DataPoint

        public DataPoint()
    • Method Detail

      • data

        public ChartModel.DataPoint data​(String series,
                                         Object value)
        Sets the data value for the given series of this data point.
        Parameters:
        series - series name
        value - value to set
        Returns:
        self, for chaining
      • get

        public Object get​(String series)
        Returns the data value with the given series for this data point.
        Parameters:
        series - series name
        Returns:
        data value
      • getAll

        public Object[] getAll()
        Return the data value with the same order of series.
        Returns:
        an array of ordered data values
      • size

        public int size()
        Returns the size of data point.
        Returns:
        the size of data point
      • getAsString

        public String getAsString​(String series)
        Returns the value of the data point as a string, using the formatter appropriate for the series.
        Parameters:
        series - series
        Returns:
        formatted data point value
      • getAsStrings

        public String[] getAsStrings()
        Returns the row as an array of formatted strings.
        Returns:
        the string format of data points