Class ChartBackgroundColorOptions

    • Constructor Detail

      • ChartBackgroundColorOptions

        public ChartBackgroundColorOptions()
        Builds the object with new java script object setting the default value of plugin.
        The global plugin options is used, if exists, as defaults values.
      • ChartBackgroundColorOptions

        public ChartBackgroundColorOptions​(IsChart chart)
        Builds the object with a chart instance in order to get the right defaults.
        If the plugin options have not been set by chart type, it will use the global.
        Parameters:
        chart - chart instance related to the plugin options
    • Method Detail

      • getColorType

        public ColorType getColorType()
        Returns the type of background color has been set.
        Returns:
        the type of background color has been set.
      • getBackgroundColorAsString

        public String getBackgroundColorAsString()
        Returns the background color.
        If it has been set a gradient or pattern, returns null, otherwise the default color.
        Returns:
        the background color.
        If it has been set a gradient or pattern, returns null, otherwise the default color.
      • getBackgroundColor

        public IsColor getBackgroundColor()
        Returns the background color.
        If it has been set a gradient or pattern, returns null, otherwise the default color.
        Returns:
        the background color.
        If it has been set a gradient or pattern, returns null, otherwise the default color.
      • getBackgroundColorAsGradient

        public Gradient getBackgroundColorAsGradient()
        Returns the background gradient.
        If it has been set a color or pattern, returns null.
        Returns:
        the background gradient.
        If it has been set a color or pattern, returns null
      • getBackgroundColorAsPattern

        public Pattern getBackgroundColorAsPattern()
        Returns the background pattern.
        If it has been set a color or gradient, returns null.
        Returns:
        the background pattern.
        If it has been set a color or pattern, returns null
      • setBackgroundColor

        public void setBackgroundColor​(String color)
        Sets the background color.
        Parameters:
        color - the background color.
      • setBackgroundColor

        public void setBackgroundColor​(IsColor color)
        Sets the background color.
        Parameters:
        color - the background color.
      • setBackgroundColor

        public void setBackgroundColor​(Gradient gradient)
        Sets the background gradient.
        Parameters:
        gradient - the background gradient.
      • setBackgroundColor

        public void setBackgroundColor​(Pattern pattern)
        Sets the background pattern.
        Parameters:
        pattern - the background pattern.
      • getAreaColorType

        public ColorType getAreaColorType()
        Returns the type of background color has been set.
        Returns:
        the type of background color has been set.
      • getAreaBackgroundColorAsString

        public String getAreaBackgroundColorAsString()
        Returns the area background color.
        If it has been set a gradient or pattern, returns null, otherwise the default color, "transparent".
        Returns:
        the area background color.
        If it has been set a gradient or pattern, returns null, otherwise the default color.
      • getAreaBackgroundColor

        public IsColor getAreaBackgroundColor()
        Returns the area background color.
        If it has been set a gradient or pattern, returns null, otherwise the default color.
        Returns:
        the area background color.
        If it has been set a gradient or pattern, returns null, otherwise the default color.
      • getAreaBackgroundColorAsGradient

        public Gradient getAreaBackgroundColorAsGradient()
        Returns the area background gradient.
        If it has been set a color or pattern, returns null.
        Returns:
        the area background gradient.
        If it has been set a color or pattern, returns null
      • getAreaBackgroundColorAsPattern

        public Pattern getAreaBackgroundColorAsPattern()
        Returns the area background pattern.
        If it has been set a color or gradient, returns null.
        Returns:
        the area background pattern.
        If it has been set a color or pattern, returns null
      • setAreaBackgroundColor

        public void setAreaBackgroundColor​(String color)
        Sets the area background color.
        Parameters:
        color - the area background color.
      • setAreaBackgroundColor

        public void setAreaBackgroundColor​(IsColor color)
        Sets the area background color.
        Parameters:
        color - the area background color.
      • setAreaBackgroundColor

        public void setAreaBackgroundColor​(Gradient gradient)
        Sets the area background gradient.
        Parameters:
        gradient - the area background gradient.
      • setAreaBackgroundColor

        public void setAreaBackgroundColor​(Pattern pattern)
        Sets the area background pattern.
        Parameters:
        pattern - the area background pattern.
      • setGlobalCompositeOperation

        public void setGlobalCompositeOperation​(GlobalCompositeOperation globalCompositeOperation)
        Sets the type of compositing operation to apply when drawing new shapes.
        Parameters:
        globalCompositeOperation - which of the compositing or blending mode operations to use
      • getGlobalCompositeOperation

        public GlobalCompositeOperation getGlobalCompositeOperation()
        Returns the type of compositing operation to apply when drawing new shapes.
        Returns:
        which of the compositing or blending mode operations to use
      • setFillArea

        public void setFillArea​(boolean fillArea)
        Sets true if the want to fill the chart area with also the canvas background color.
        Parameters:
        fillArea - true if the want to fill the chart area with also the canvas background color.
      • isFillArea

        public boolean isFillArea()
        Returns true if the want to fill the chart area with also the canvas background color.
        Returns:
        true if the want to fill the chart area with also the canvas background color.