Class Chart.Builder<T extends Chart.Builder<T>>

    • Constructor Detail

      • Builder

        public Builder​(String title,
                       StyleChart style)
        Parameters:
        title - Title for the chart (may be null)
        style - Style for the chart (may be null)
    • Method Detail

      • suppressAxisHorizontal

        public T suppressAxisHorizontal​(boolean suppressAxisHorizontal)
        Parameters:
        suppressAxisHorizontal - if true: don't show the horizontal axis (default: show)
      • suppressAxisVertical

        public T suppressAxisVertical​(boolean suppressAxisVertical)
        Parameters:
        suppressAxisVertical - if true: don't show the vertical axis (default: show)
      • showLegend

        public T showLegend​(boolean showLegend)
        Parameters:
        showLegend - if true: show the legend. (default: no legend)
      • setXMin

        public T setXMin​(Double xMin)
        Used to override/set the minimum value for the x axis. If this is not set, x axis minimum is set based on the data
        Parameters:
        xMin - Minimum value to use for the x axis
      • setXMax

        public T setXMax​(Double xMax)
        Used to override/set the maximum value for the x axis. If this is not set, x axis maximum is set based on the data
        Parameters:
        xMax - Maximum value to use for the x axis
      • setYMin

        public T setYMin​(Double yMin)
        Used to override/set the minimum value for the y axis. If this is not set, y axis minimum is set based on the data
        Parameters:
        yMin - Minimum value to use for the y axis
      • setYMax

        public T setYMax​(Double yMax)
        Used to override/set the maximum value for the y axis. If this is not set, y axis minimum is set based on the data
        Parameters:
        yMax - Minimum value to use for the y axis
      • setGridWidth

        public T setGridWidth​(Double gridVerticalStrokeWidth,
                              Double gridHorizontalStrokeWidth)
        Set the grid lines to be enabled, and if enabled: set the grid.
        Parameters:
        gridVerticalStrokeWidth - If null (or 0): show no vertical grid. Otherwise: width in px
        gridHorizontalStrokeWidth - If null (or 0): show no horizontal grid. Otherwise: width in px
      • setGridWidth

        public T setGridWidth​(Integer gridVerticalStrokeWidth,
                              Integer gridHorizontalStrokeWidth)
        Set the grid lines to be enabled, and if enabled: set the grid.
        Parameters:
        gridVerticalStrokeWidth - If null (or 0): show no vertical grid. Otherwise: width in px
        gridHorizontalStrokeWidth - If null (or 0): show no horizontal grid. Otherwise: width in px