Class ColorSchemesOptions

    • Field Detail

      • DEFAULT_SCHEME_SCOPE

        public static final SchemeScope DEFAULT_SCHEME_SCOPE
        Default color scheme scope (for bar and bubble charts), SchemeScope.DATASET.
      • DEFAULT_BACKGROUND_ALPHA

        public static final double DEFAULT_BACKGROUND_ALPHA
        Default transparency value for the background color, 0.5.
        See Also:
        Constant Field Values
      • DEFAULT_REVERSE

        public static final boolean DEFAULT_REVERSE
        Default the order of the colors in the selected scheme is reversed, false.
        See Also:
        Constant Field Values
      • DEFAULT_SCHEME_CATEGORY

        public static final String DEFAULT_SCHEME_CATEGORY
        Default category when new color scheme has been created on top of the available schemes, "custom".
        See Also:
        Constant Field Values
    • Constructor Detail

      • ColorSchemesOptions

        public ColorSchemesOptions()
        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.
      • ColorSchemesOptions

        public ColorSchemesOptions​(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

      • setSchemeScope

        public void setSchemeScope​(SchemeScope schemeScope)
        Sets the color scheme scope when the scheme is applied to hoving flex datasets, like bars charts.
        Parameters:
        schemeScope - the color scheme scope when the scheme is applied to hoving flex datasets, like bars charts.
      • getSchemeScope

        public SchemeScope getSchemeScope()
        Returns the color scheme scope when the scheme is applied to hoving flex datasets, like bars charts.
        Returns:
        the color scheme scope when the scheme is applied to hoving flex datasets, like bars charts
      • setScheme

        public void setScheme​(ColorScheme scheme)
        Sets the color scheme.
        Parameters:
        scheme - the color scheme.
      • getScheme

        public ColorScheme getScheme()
        Returns the color scheme.
        Returns:
        the color scheme
      • setBackgroundColorAlpha

        public void setBackgroundColorAlpha​(double backgroundColorAlpha)
        The transparency value for the background color. Must be a number between 0.0 (fully transparent) and 1.0 (no transparency).
        Parameters:
        backgroundColorAlpha - the transparency value for the background color
      • getBackgroundColorAlpha

        public double getBackgroundColorAlpha()
        The transparency value for the background color. Must be a number between 0.0 (fully transparent) and 1.0 (no transparency).
        Returns:
        the transparency value for the background color
      • setReverse

        public void setReverse​(boolean reverse)
        If set to true, the order of the colors in the selected scheme is reversed.
        Parameters:
        reverse - if set to true, the order of the colors in the selected scheme is reversed
      • isReverse

        public boolean isReverse()
        If set to true, the order of the colors in the selected scheme is reversed.
        Returns:
        if set to true, the order of the colors in the selected scheme is reversed
      • getSchemeCategory

        public default String getSchemeCategory()
        Returns the color scheme category.
        Returns:
        the color scheme category
      • getSchemeName

        public default String getSchemeName()
        Returns the color scheme name.
        Returns:
        the color scheme name