Class ChartPieConfigurationBuilder

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

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

    • ChartPieConfigurationBuilder

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

    • setFixedSize

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

      public ChartPieConfigurationBuilder setRing(Double ring)
      Sets the ring size, if greater than 0, the chart will be a doughnut chart.
      Parameters:
      ring - The ring size.
      Returns:
      This object.
    • setShowLegend

      public ChartPieConfigurationBuilder setShowLegend(boolean showLegend)
      Sets the show legend flag.
      Parameters:
      showLegend - The show legend flag.
      Returns:
      This object.
    • setSerie

      public ChartPieConfigurationBuilder setSerie(overit.geocall.charts.Serie serie)
      Sets the serie.
      Parameters:
      serie - The serie.
      Returns:
      This object.
    • setSerieColors

      public ChartPieConfigurationBuilder setSerieColors(List<Color> serieColors)
      Sets the serie colors.
      Parameters:
      serieColors - The serie colors.
      Returns:
      This object.
    • setLegendFont

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

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

      public ChartPieConfigurationBuilder setLegendItemSize(double legendItemSize)
      Sets the legend item size.
      Parameters:
      legendItemSize - The legend item size.
      Returns:
      This object.
    • setItemLabelFormat

      public ChartPieConfigurationBuilder setItemLabelFormat(String itemLabelFormat)
      Sets the format used for the labels of the elements of the chart.
      Parameters:
      itemLabelFormat - The format used for the labels of the elements of the chart
      Returns:
      This object.
    • setItemLabels

      public ChartPieConfigurationBuilder setItemLabels(List<String> itemLabels)
      Sets the labels of the elements of the chart.
      Parameters:
      itemLabels - The labels of the elements of the chart
      Returns:
      This object.
    • setItemLabelFont

      public ChartPieConfigurationBuilder setItemLabelFont(overit.geocall.charts.ChartFont itemLabelFont)
      Sets the font used for the labels of the elements of the chart.
      Parameters:
      itemLabelFont - The font used for the labels of the elements of the chart
      Returns:
      This object.
    • setItemLabelBox

      public ChartPieConfigurationBuilder setItemLabelBox(overit.geocall.charts.ChartLabelBox itemLabelBox)
      Sets the label box used for the labels of the elements of the chart.
      Parameters:
      itemLabelBox - The label box used for the labels of the elements of the chart
      Returns:
      This object.
    • getMapper

      protected JackMapper getMapper()
    • buildJsonConfiguration

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