Class DatasetsItemsSelectorOptionsBuilder

    • Method Detail

      • create

        public static DatasetsItemsSelectorOptionsBuilder create​(IsChart chart)
        Returns new builder instance using the chart global options.
        Parameters:
        chart - chart instance related to the plugin options
        Returns:
        new builder instance
      • setEnabled

        public DatasetsItemsSelectorOptionsBuilder setEnabled​(boolean enabled)
        Sets true if plugin is enabled.
        Parameters:
        enabled - true if plugin is enabled.
        Returns:
        builder instance
      • setXAxisID

        public DatasetsItemsSelectorOptionsBuilder setXAxisID​(String xAxisID)
        Sets the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.
        Parameters:
        xAxisID - the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.
        Returns:
        builder instance
      • setXAxisID

        public DatasetsItemsSelectorOptionsBuilder setXAxisID​(ScaleId xAxisID)
        Sets the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.
        Parameters:
        xAxisID - the ID of the x axis to plot this dataset on. If not specified, this defaults to the ID of the first found x axis.
        Returns:
        builder instance
      • setBorderDash

        public DatasetsItemsSelectorOptionsBuilder setBorderDash​(int... borderDash)
        Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
        Parameters:
        borderDash - the line dash pattern used when stroking lines
        Returns:
        builder instance
      • setBorderWidth

        public DatasetsItemsSelectorOptionsBuilder setBorderWidth​(int borderWidth)
        Sets the border width of the selection.
        Parameters:
        borderWidth - the border width of the selection.
        Returns:
        builder instance
      • setModifierKey

        public DatasetsItemsSelectorOptionsBuilder setModifierKey​(ModifierKey modifierKey)
        Sets the modifier key to activate selection.
        Parameters:
        modifierKey - the modifier key to activate selection
        Returns:
        builder instance
      • setDisplay

        public DatasetsItemsSelectorOptionsBuilder setDisplay​(boolean display)
        Sets true if clear of selection label will e applied in the chart, otherwise false.
        Parameters:
        display - true if clear of selection label will e applied in the chart, otherwise false
        Returns:
        builder instance
      • setFontStyle

        public DatasetsItemsSelectorOptionsBuilder setFontStyle​(FontStyle fontStyle)
        Sets the font style, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).
        Parameters:
        fontStyle - Font style, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).
        Returns:
        builder instance
      • setFontFamily

        public DatasetsItemsSelectorOptionsBuilder setFontFamily​(String fontFamily)
        Sets the font family, follows CSS font-family in selection cleaner.
        Parameters:
        fontFamily - Font family, follows CSS font-family in selection cleaner.
        Returns:
        builder instance
      • setFontColor

        public DatasetsItemsSelectorOptionsBuilder setFontColor​(String color)
        Sets the selection cleaner label font color.
        Parameters:
        color - the selection cleaner label font color.
        Returns:
        builder instance
      • setFontColor

        public DatasetsItemsSelectorOptionsBuilder setFontColor​(IsColor color)
        Set the selection cleaner label font color.
        Parameters:
        color - the selection cleaner label font color.
        Returns:
        builder instance
      • setPosition

        public DatasetsItemsSelectorOptionsBuilder setPosition​(Position position)
        Sets the selection cleaner label position.
        Parameters:
        position - the selection cleaner label position
        Returns:
        builder instance
      • setMargin

        public DatasetsItemsSelectorOptionsBuilder setMargin​(int margin)
        Sets the margin from canvas border.
        Parameters:
        margin - margin from canvas border
        Returns:
        builder instance
      • setPadding

        public DatasetsItemsSelectorOptionsBuilder setPadding​(int padding)
        Sets the padding of selection cleaner element.
        Parameters:
        padding - padding of selection cleaner element
        Returns:
        builder instance
      • setSpacing

        public DatasetsItemsSelectorOptionsBuilder setSpacing​(int spacing)
        Sets the spacing between label and image for selection cleaner element.
        Parameters:
        spacing - spacing between label and image for selection cleaner element
        Returns:
        builder instance
      • setUseSelectionStyle

        public DatasetsItemsSelectorOptionsBuilder setUseSelectionStyle​(boolean useSelectionStyle)
        Sets true if clear of selection label will e applied in the chart, otherwise false.
        Parameters:
        useSelectionStyle - true if clear of selection label will e applied in the chart, otherwise false
        Returns:
        builder instance