Interface DataSet

    • Method Detail

      • get

        double get​(int dimIndex,
                   int index)
        Gets the x value of the data point with the index i
        Parameters:
        dimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        index - data point index
        Returns:
        the x value
      • getAxisDescription

        default AxisDescription getAxisDescription​(int dim)
        Return the axis description of the i-th axis.
        Parameters:
        dim - 0: X-Axis, 1: Y-Axis, ...
        Returns:
        Axis Label
      • getAxisDescriptions

        java.util.List<AxisDescription> getAxisDescriptions()
        Returns:
        axis descriptions of the primary and secondary axes
      • getDataCount

        default int getDataCount()
        Get the number of data points in the data set. The default implementation is the number of points in the highest dimension.
        Returns:
        the number of data points
      • getDataCount

        int getDataCount​(int dimIndex)
        Get the number of data points in the data set for a specific dimension.
        Parameters:
        dimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        Returns:
        the number of data points
      • getDataLabel

        java.lang.String getDataLabel​(int index)
        Returns label of a data point specified by the index. The label can be used as a category name if CategoryStepsDefinition is used or for annotations displayed for data points.
        Parameters:
        index - the data index
        Returns:
        label of a data point specified by the index or null if none label has been specified for this data point.
      • getDimension

        int getDimension()
        Returns:
        number of dimensions
      • getIndex

        int getIndex​(int dimIndex,
                     double value)
        Gets the index of the data point closest to the given 'value' coordinate. The index returned may be less then zero or larger the the number of data points in the data set, if the x coordinate lies outside the range of the data set.
        Parameters:
        dimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        value - the data point coordinate to search for
        Returns:
        the index of the data point
      • getName

        java.lang.String getName()
        Gets the name of the data set.
        Returns:
        the name of the DataSet
      • getStyle

        java.lang.String getStyle()
        A string representation of the CSS style associated with this specific DataSet. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.
        Returns:
        user-specific data set style description (ie. may be set by user)
      • getStyle

        java.lang.String getStyle​(int index)
        A string representation of the CSS style associated with this specific DataSet data point. @see #getStyle()
        Parameters:
        index - the specific data point index
        Returns:
        user-specific data set style description (ie. may be set by user)
      • getValue

        double getValue​(int dimIndex,
                        double x)
        Gets the interpolated y value of the data point for given x coordinate
        Parameters:
        dimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        x - the new x coordinate
        Returns:
        the y value
      • getValues

        default double[] getValues​(int dimIndex)
        Parameters:
        dimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        Returns:
        the x value array
      • lock

        <D extends DataSetDataSetLock<D> lock()
        Type Parameters:
        D - generics (fluent design)
        Returns:
        Read-Write Lock to guard the DataSet
        See Also:
        DataSetLock
      • recomputeLimits

        DataSet recomputeLimits​(int dimension)
      • setStyle

        DataSet setStyle​(java.lang.String style)
        A string representation of the CSS style associated with this specific DataSet. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.
        Parameters:
        style - the new user-specific style
        Returns:
        itself (fluent interface)