Class MeterDataset

    • Field Detail

      • DEFAULT_VALUE_COLOR

        public static final IsColor DEFAULT_VALUE_COLOR
        Default value color, rgb(140, 214, 16).
      • DEFAULT_EMPTY_VALUE_COLOR

        public static final IsColor DEFAULT_EMPTY_VALUE_COLOR
        Default empty color, rgb(234, 234, 234).
      • DEFAULT_MAXIMUM_VALUE

        public static final double DEFAULT_MAXIMUM_VALUE
        Default maximum value is 100.0.
        See Also:
        Constant Field Values
      • MINIMUM_VALUE

        public static final double MINIMUM_VALUE
        Minimum value is 0.0.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MeterDataset

        public MeterDataset​(double max)
        Creates a dataset setting the maximum value of dataset. It uses the global options has default.
        Parameters:
        max - maximum value of dataset.
      • MeterDataset

        public MeterDataset​(double max,
                            IsDefaultOptions defaultValues)
        Creates a dataset setting the maximum value of dataset and defaults value.
        Parameters:
        max - maximum value of dataset.
        defaultValues - default options
      • MeterDataset

        protected MeterDataset​(ControllerType type,
                               double max,
                               IsDefaultOptions defaultValues)
        Creates a dataset setting the maximum value of dataset and defaults value and the controller type in case of extension
        Parameters:
        type - controller type related to the dataset
        max - maximum value of dataset.
        defaultValues - default options
    • Method Detail

      • getValueLabel

        public final ValueLabel getValueLabel()
        Returns the value element of meter chart.
        Returns:
        the value element of meter chart
      • getDescriptionLabel

        public final DescriptionLabel getDescriptionLabel()
        Returns the description element of meter chart.
        Returns:
        the description element of meter chart
      • setColor

        public void setColor​(IsColor valueColor)
        Sets the fill color for value.
        Parameters:
        valueColor - the fill color for value.
      • setColor

        public void setColor​(String valueColor)
        Sets the fill color for value.
        Parameters:
        valueColor - the fill color for value.
      • getColorAsString

        public String getColorAsString()
        Returns the fill color for value.
        Returns:
        the fill color for value.
      • getColor

        public IsColor getColor()
        Returns the fill color for value.
        Returns:
        the fill color for value.
      • setEmptyColor

        public void setEmptyColor​(IsColor emptyValueColor)
        Sets the fill color for empty sector.
        Parameters:
        emptyValueColor - the fill color for empty sector.
      • setEmptyColor

        public void setEmptyColor​(String emptyValueColor)
        Sets the fill color for empty sector.
        Parameters:
        emptyValueColor - the fill color for empty sector.
      • getEmptyColorAsString

        public String getEmptyColorAsString()
        Returns the fill color for empty sector.
        Returns:
        the fill color for empty sector.
      • getEmptyColor

        public IsColor getEmptyColor()
        Returns the fill color for empty sector.
        Returns:
        the fill color for empty sector.
      • getMax

        public final double getMax()
        Returns the maximum value of chart.
        Returns:
        the max
      • setMax

        public void setMax​(double max)
        Sets the maximum value of chart.
        Parameters:
        max - the maximum value of chart.
      • getValue

        public final double getValue()
        Returns the value of the chart.
        Returns:
        the value
      • setValue

        public void setValue​(double value)
        Parameters:
        value - the value to set
      • setBorderColor

        public void setBorderColor​(IsColor borderColor)
        Sets the color of the arc border.
        Parameters:
        borderColor - the color of the arc border
      • setBorderColor

        public void setBorderColor​(String borderColor)
        Sets the color of the arc border.
        Parameters:
        borderColor - the color of the arc border
      • getBorderColorAsString

        public String getBorderColorAsString()
        Returns the color of the arc border, as string.
        Returns:
        the color of the arc border.
      • getBorderColor

        public IsColor getBorderColor()
        Returns the color of the arc border.
        Returns:
        the color of the arc border
      • setBorderWidth

        public void setBorderWidth​(int borderWidth)
        Sets the width of the arc border.
        Parameters:
        borderWidth - the width of the arc border.
      • getBorderWidth

        public int getBorderWidth()
        Returns the width of the arc border.
        Returns:
        the width of the arc border.
      • setBorderRadius

        public void setBorderRadius​(int borderRadius)
        Sets the arc border radius (in pixels).
        Parameters:
        borderRadius - the arc border radius (in pixels).
      • setBorderRadius

        public void setBorderRadius​(ArcBorderRadius borderRadius)
        Sets the arc border radius (in pixels).
        Parameters:
        borderRadius - the arc border radius (in pixels).
      • getBorderRadius

        public int getBorderRadius()
        Returns the arc border radius (in pixels).
        Returns:
        the arc border radius (in pixels).
      • getBorderRadiusAsObject

        public ArcBorderRadius getBorderRadiusAsObject()
        Returns the arc border radius, as object.
        Returns:
        the arc border radius, as object
      • setData

        public final void setData​(double... values)
        Throws an exception because not available.
        Overrides:
        setData in class Dataset
        Parameters:
        values - ignored because will throw an exception
      • setData

        public final void setData​(List<Double> values)
        Throws an exception because not available.
        Overrides:
        setData in class Dataset
        Parameters:
        values - ignored because will throw an exception
      • setBackgroundColor

        public void setBackgroundColor​(ColorCallback<DatasetContext> backgroundColorCallback)
        Description copied from class: Dataset
        Sets the background color callback.
        Overrides:
        setBackgroundColor in class Dataset
        Parameters:
        backgroundColorCallback - the background color callback.
      • setBackgroundColor

        public void setBackgroundColor​(NativeCallback backgroundColorCallback)
        Description copied from class: Dataset
        Sets the background color callback.
        Overrides:
        setBackgroundColor in class Dataset
        Parameters:
        backgroundColorCallback - the background color callback.
      • setHoverBackgroundColor

        public void setHoverBackgroundColor​(ColorCallback<DatasetContext> hoverBackgroundColorCallback)
        Description copied from class: Dataset
        Sets the hover background color callback.
        Overrides:
        setHoverBackgroundColor in class Dataset
        Parameters:
        hoverBackgroundColorCallback - the hover background color callback.
      • setHoverBackgroundColor

        public void setHoverBackgroundColor​(NativeCallback hoverBackgroundColorCallback)
        Description copied from class: Dataset
        Sets the hover background color callback.
        Overrides:
        setHoverBackgroundColor in class Dataset
        Parameters:
        hoverBackgroundColorCallback - the hover background color callback.
      • setBorderColor

        public void setBorderColor​(ColorCallback<DatasetContext> borderColorCallback)
        Description copied from class: Dataset
        Sets the border color callback.
        Overrides:
        setBorderColor in class Dataset
        Parameters:
        borderColorCallback - the border color callback.
      • setBorderColor

        public void setBorderColor​(NativeCallback borderColorCallback)
        Description copied from class: Dataset
        Sets the border color callback.
        Overrides:
        setBorderColor in class Dataset
        Parameters:
        borderColorCallback - the border color callback.
      • setHoverBorderColor

        public void setHoverBorderColor​(ColorCallback<DatasetContext> hoverBorderColorCallback)
        Description copied from class: Dataset
        Sets the hover border color callback.
        Overrides:
        setHoverBorderColor in class Dataset
        Parameters:
        hoverBorderColorCallback - the hover border color callback.
      • setHoverBorderColor

        public void setHoverBorderColor​(NativeCallback hoverBorderColorCallback)
        Description copied from class: Dataset
        Sets the hover border color callback.
        Overrides:
        setHoverBorderColor in class Dataset
        Parameters:
        hoverBorderColorCallback - the hover border color callback.