Class ChartJsFill


  • public final class ChartJsFill
    extends Object
    A value object to represent the fill-configuration for a chart, ie. how to fill the area under a line or radar graph. Gets serialised to a javascript string value. Corresponds to the config.data.datasets[].fill property.
    Author:
    haster
    • Field Detail

    • Method Detail

      • disabled

        public static ChartJsFill disabled()
        Sets the fill property to a value indicating it is disabled (ie, don't fill)
      • boundary

        public static ChartJsFill boundary​(ChartJsBoundaryType boundary)
        Sets the fill property to a value indicating fill to a boundary.
        Parameters:
        boundary - The boundary to which the area needs to be filled.
      • relativeIndex

        public static ChartJsFill relativeIndex​(int datasetIndex)
        Sets the fill property to a value indicating fill to another dataset.
        Parameters:
        datasetIndex - the relative index of the dataset to which the area should be filled. Must be nonzero.
      • absoluteIndex

        public static ChartJsFill absoluteIndex​(int datasetIndex)
        Sets the fill property to a value indicating fill to another dataset.
        Parameters:
        datasetIndex - the absolute index of the dataset to which the area should be filled. Must be strictly positive.
      • toJsonString

        public String toJsonString()