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

        int getDataCount()
        Get the number of data points in the data set.
        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... x)
        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')
        x - the data point coordinates 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)
      • getValues

        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 dimIndex)
        Parameters:
        dimIndex - the dimension to recompute the range for (-1 for all dimensions)
        Returns:
        itself for method chaining
      • 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)
      • getValue

        double getValue​(int dimIndex,
                        double... x)
        Returns the value along the 'dimIndex' axis of a point specified by the x coordinate.
        Parameters:
        dimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        x - horizontal 'dimIndex' coordinate
        Returns:
        'dimIndex' value
      • set

        DataSet set​(DataSet other,
                    boolean copy)
        Parameters:
        other - Other DataSet to copy into this DataSet
        copy - true: perform a deep copy (default), false: reuse the other dataset's internal data structures (if applicable)
        Returns:
        itself (fluent design) -- N.B. existing update listener are preserved
      • set

        default DataSet set​(DataSet other)
        Parameters:
        other - Other DataSet to copy into this DataSet
        Returns:
        itself (fluent design) -- N.B. existing update listener are preserved