Class ChartSerieConfigurationBuilder

java.lang.Object
overit.geocall.basic.ui.control.ChartSerieConfigurationBuilder

@Component @Scope(value="prototype", proxyMode=NO) public class ChartSerieConfigurationBuilder extends Object
This class is used to build the configuration of the serie chart.
  • Constructor Details

    • ChartSerieConfigurationBuilder

      public ChartSerieConfigurationBuilder(JackMapper mapper)
      Creates a new instance of ChartSerieConfigurationBuilder.
      Parameters:
      mapper - The mapper used to serialize the configuration.
  • Method Details

    • setFixedSize

      public ChartSerieConfigurationBuilder setFixedSize(boolean fixedSize)
      Sets the fixed size flag.
      Parameters:
      fixedSize - The fixed size flag.
      Returns:
      This object.
    • addSerie

      public ChartSerieConfigurationBuilder addSerie(overit.geocall.charts.Serie serie, ChartSerieType type, String dataLabelFormat, Color color, boolean stroke, String shape)
      Adds a serie to the chart.
      Parameters:
      serie - The serie to add.
      type - The type of the serie.
      dataLabelFormat - The format for the data labels.
      color - The color of the serie.
      stroke - Whether the serie has a stroke, relevant only for line series
      shape - The shape of the serie, relevant only for line series
      Returns:
      This object.
    • setDomainLabels

      public ChartSerieConfigurationBuilder setDomainLabels(List<String> domainLabels)
      Sets the domain labels.
      Parameters:
      domainLabels - The domain labels.
      Returns:
      This object.
    • setValuesMin

      public ChartSerieConfigurationBuilder setValuesMin(Double valueMin)
      Sets the minimum value for the values axis.
      Parameters:
      valueMin - The minimum value.
      Returns:
      This object.
    • setValuesMax

      public ChartSerieConfigurationBuilder setValuesMax(Double valueMax)
      Sets the maximum value for the values axis.
      Parameters:
      valueMax - The maximum value.
      Returns:
      This object.
    • setLegendFont

      public ChartSerieConfigurationBuilder setLegendFont(overit.geocall.charts.ChartFont legendFont)
      Sets the legend font.
      Parameters:
      legendFont - The legend font.
      Returns:
      This object.
    • setLegendBox

      public ChartSerieConfigurationBuilder setLegendBox(overit.geocall.charts.ChartLegendBox legendBox)
      Sets the legend box, it supports only the positioning
      Parameters:
      legendBox - The legend box.
      Returns:
      This object.
    • setShowDomainGridLine

      public ChartSerieConfigurationBuilder setShowDomainGridLine(boolean showDomainGridLine)
      Sets whether the domain grid line should be shown.
      Parameters:
      showDomainGridLine - Whether the domain grid line should be shown.
      Returns:
      This object.
    • setShowValuesGridLine

      public ChartSerieConfigurationBuilder setShowValuesGridLine(boolean showValuesGridLine)
      Sets whether the values grid line should be shown.
      Parameters:
      showValuesGridLine - Whether the values grid line should be shown.
      Returns:
      This object.
    • setValuesStep

      public ChartSerieConfigurationBuilder setValuesStep(Double valuesStep)
      Sets the step between the values for the values axis.
      Parameters:
      valuesStep - The step between the values.
      Returns:
      This object.
    • setValuesTitle

      public ChartSerieConfigurationBuilder setValuesTitle(String valuesTitle)
      Sets the title for the values axis.
      Parameters:
      valuesTitle - The title for the values axis.
      Returns:
      This object.
    • setValuesTitleFont

      public ChartSerieConfigurationBuilder setValuesTitleFont(overit.geocall.charts.ChartFont valuesTitleFont)
      Sets the font for the title of the values axis.
      Parameters:
      valuesTitleFont - The font for the title of the values axis.
      Returns:
      This object.
    • setValuesFont

      public ChartSerieConfigurationBuilder setValuesFont(overit.geocall.charts.ChartFont valuesFont)
      Sets the font for the values on the values axis.
      Parameters:
      valuesFont - The font for the values on the values axis.
      Returns:
      This object.
    • setDomainTitle

      public ChartSerieConfigurationBuilder setDomainTitle(String domainTitle)
      Sets the title for the domain axis.
      Parameters:
      domainTitle - The title for the domain axis.
      Returns:
      This object.
    • setDomainTitleFont

      public ChartSerieConfigurationBuilder setDomainTitleFont(overit.geocall.charts.ChartFont domainTitleFont)
      Sets the font for the title of the domain axis.
      Parameters:
      domainTitleFont - The font for the title of the domain axis.
      Returns:
      This object.
    • setDomainFont

      public ChartSerieConfigurationBuilder setDomainFont(overit.geocall.charts.ChartFont domainFont)
      Sets the font for the values on the domain axis.
      Parameters:
      domainFont - The font for the values on the domain axis.
      Returns:
      This object.
    • setDomainRotation

      public ChartSerieConfigurationBuilder setDomainRotation(int domainRotation)
      Sets the rotation for the values on the domain axis.
      Parameters:
      domainRotation - The rotation for the values on the domain axis.
      Returns:
      This object.
    • setStacked

      public ChartSerieConfigurationBuilder setStacked(boolean stacked)
      Sets whether the series should be stacked.
      Parameters:
      stacked - Whether the series should be stacked.
      Returns:
      This object.
    • setLegendItemSize

      public ChartSerieConfigurationBuilder setLegendItemSize(double legendItemSize)
      Sets the size of the legend items.
      Parameters:
      legendItemSize - The size of the legend items.
      Returns:
      This object.
    • setHorizontal

      public ChartSerieConfigurationBuilder setHorizontal(boolean horizontal)
      Sets whether the chart should be horizontal.
      Parameters:
      horizontal - Whether the chart should be horizontal.
      Returns:
      This object.
    • setShowLegend

      public ChartSerieConfigurationBuilder setShowLegend(boolean showLegend)
      Sets whether the legend should be shown.
      Parameters:
      showLegend - Whether the legend should be shown.
      Returns:
      This object.
    • setZoomable

      public ChartSerieConfigurationBuilder setZoomable(boolean zoomable)
      Sets whether the chart should be zoomable.
      Parameters:
      zoomable - Whether the chart should be zoomable.
      Returns:
      This object.
    • setItemLabelFont

      public ChartSerieConfigurationBuilder setItemLabelFont(overit.geocall.charts.ChartFont itemLabelFont)
      Sets the font for the labels of the elements of each serie.
      Parameters:
      itemLabelFont - The font for the labels of the elements of each serie.
      Returns:
      This object.
    • hasItemLabels

      protected boolean hasItemLabels()
    • getMapper

      protected JackMapper getMapper()
    • buildJsonConfiguration

      public String buildJsonConfiguration()
      Builds the JSON configuration for the chart.
      Returns:
      The JSON configuration for the chart.