Class PieChartImpl

All Implemented Interfaces:
Chart<PieChart>, PieChart, SlicedChart<PieChart>, HasStartEffect<PieChart>, ChartModel<PieChart>, PieChartModel<PieChart>, SlicedChartModel<PieChart>, HasColors<PieChart>, HasMargins<PieChart>, AttachNotifier, Component, Component.BelongToFrame, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper, HasContextHelp, HasDebugId, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer, org.springframework.beans.factory.InitializingBean

public class PieChartImpl extends SlicedChartImpl<PieChart,PieChartModelImpl> implements PieChart
  • Constructor Details

    • PieChartImpl

      public PieChartImpl()
  • Method Details

    • createChartConfiguration

      protected PieChartModelImpl createChartConfiguration()
      Specified by:
      createChartConfiguration in class ChartImpl<PieChart,PieChartModelImpl>
    • getAngle

      public Integer getAngle()
      Specified by:
      getAngle in interface PieChartModel<PieChart>
      Returns:
      angle
    • setAngle

      public PieChart setAngle(Integer angle)
      Description copied from interface: PieChartModel
      Sets pie lean angle (for 3D effect). Valid range is 0 - 90. If not set the default value is 0.
      Specified by:
      setAngle in interface PieChartModel<PieChart>
      Parameters:
      angle - the angle
      Returns:
      pie chart model
    • getBalloonText

      public String getBalloonText()
      Specified by:
      getBalloonText in interface PieChartModel<PieChart>
      Returns:
      balloon text
    • setBalloonText

      public PieChart setBalloonText(String balloonText)
      Description copied from interface: PieChartModel
      Sets balloon text. The following tags can be used: [[value]], [[title]], [[percents]], [[description]]. Also can be used fields in the chart such as titleField, valueField etc. Fields that not used in the chart can be added by using additionalFields. HTML tags can also be used. If not set the default value is "[[title]]: [[percents]]% ([[value]])\n[[description]]".
      Specified by:
      setBalloonText in interface PieChartModel<PieChart>
      Parameters:
      balloonText - balloon text string
      Returns:
      pie chart model
    • getDepth3D

      public Integer getDepth3D()
      Specified by:
      getDepth3D in interface PieChartModel<PieChart>
      Returns:
      depth of the pie
    • setDepth3D

      public PieChart setDepth3D(Integer depth3D)
      Description copied from interface: PieChartModel
      Sets depth of the pie (for 3D effect). If not set the default value is 0.
      Specified by:
      setDepth3D in interface PieChartModel<PieChart>
      Parameters:
      depth3D - the depth 3D
      Returns:
      pie chart model
    • getInnerRadius

      public String getInnerRadius()
      Specified by:
      getInnerRadius in interface PieChartModel<PieChart>
      Returns:
      inner radius of the pie
    • setInnerRadius

      public PieChart setInnerRadius(String innerRadius)
      Description copied from interface: PieChartModel
      Sets inner radius of the pie, in pixels or percents. If not set the default value is 0.
      Specified by:
      setInnerRadius in interface PieChartModel<PieChart>
      Parameters:
      innerRadius - inner radius in pixels or percents
      Returns:
      pie chart model
    • getLabelRadius

      public Integer getLabelRadius()
      Specified by:
      getLabelRadius in interface PieChartModel<PieChart>
      Returns:
      distance between the label and the slice, in pixels
    • setLabelRadius

      public PieChart setLabelRadius(Integer labelRadius)
      Description copied from interface: PieChartModel
      Sets the distance between the label and the slice, in pixels. You can use negative values to put the label on the slice. If not set the default value is 20.
      Specified by:
      setLabelRadius in interface PieChartModel<PieChart>
      Parameters:
      labelRadius - distance between the label and the slice, in pixels
      Returns:
      pie chart model
    • getLabelRadiusField

      public String getLabelRadiusField()
      Specified by:
      getLabelRadiusField in interface PieChartModel<PieChart>
      Returns:
      label radius field
    • setLabelRadiusField

      public PieChart setLabelRadiusField(String labelRadiusField)
      Description copied from interface: PieChartModel
      Sets name of the field from data provider which specifies the length of a tick. Note, the chart will not try to arrange labels automatically if this property is set.
      Specified by:
      setLabelRadiusField in interface PieChartModel<PieChart>
      Parameters:
      labelRadiusField - label radius field string
      Returns:
      pie chart model
    • getLabelText

      public String getLabelText()
      Specified by:
      getLabelText in interface PieChartModel<PieChart>
      Returns:
      label text
    • setLabelText

      public PieChart setLabelText(String labelText)
      Description copied from interface: PieChartModel
      Sets label text. The following tags can be used: [[value]], [[title]], [[percents]], [[description]]. Also can be used fields in the chart such as titleField, valueField etc. Fields that not used in the chart can be added by using additionalFields. If not set the default value is "[[title]]: [[percents]]%".
      Specified by:
      setLabelText in interface PieChartModel<PieChart>
      Parameters:
      labelText - label text string
      Returns:
      pie chart model
    • getMinRadius

      public Integer getMinRadius()
      Specified by:
      getMinRadius in interface PieChartModel<PieChart>
      Returns:
      minimum radius
    • setMinRadius

      public PieChart setMinRadius(Integer minRadius)
      Description copied from interface: PieChartModel
      Sets minimum radius of the pie, in pixels. If not set the default value is 10.
      Specified by:
      setMinRadius in interface PieChartModel<PieChart>
      Parameters:
      minRadius - the minimum radius
      Returns:
      pie chart model
    • getPieAlpha

      public Double getPieAlpha()
      Specified by:
      getPieAlpha in interface PieChartModel<PieChart>
      Returns:
      opacity for a slices
    • setPieAlpha

      public PieChart setPieAlpha(Double pieAlpha)
      Description copied from interface: PieChartModel
      Sets opacity for a slices.
      Specified by:
      setPieAlpha in interface PieChartModel<PieChart>
      Parameters:
      pieAlpha - the pie alpha
      Returns:
      pie chart model
    • getPieX

      public String getPieX()
      Specified by:
      getPieX in interface PieChartModel<PieChart>
      Returns:
      X position of a pie center
    • setPieX

      public PieChart setPieX(String pieX)
      Description copied from interface: PieChartModel
      Sets X position of a pie center, in pixels or in percents.
      Specified by:
      setPieX in interface PieChartModel<PieChart>
      Parameters:
      pieX - X position of a pie center
      Returns:
      pie chart model
    • getPieY

      public String getPieY()
      Specified by:
      getPieY in interface PieChartModel<PieChart>
      Returns:
      Y position of a pie center
    • setPieY

      public PieChart setPieY(String pieY)
      Description copied from interface: PieChartModel
      Sets Y position of a pie center, in pixels or in percents.
      Specified by:
      setPieY in interface PieChartModel<PieChart>
      Parameters:
      pieY - Y position of a pie center
      Returns:
      pie chart model
    • getPullOutRadius

      public String getPullOutRadius()
      Specified by:
      getPullOutRadius in interface PieChartModel<PieChart>
      Returns:
      pull out radius
    • setPullOutRadius

      public PieChart setPullOutRadius(String pullOutRadius)
      Description copied from interface: PieChartModel
      Sets pull out radius, in pixels or percents. If not set the default value is 20%.
      Specified by:
      setPullOutRadius in interface PieChartModel<PieChart>
      Parameters:
      pullOutRadius - pull out radius
      Returns:
      pie chart model
    • getRadius

      public String getRadius()
      Specified by:
      getRadius in interface PieChartModel<PieChart>
      Returns:
      radius
    • setRadius

      public PieChart setRadius(String radius)
      Description copied from interface: PieChartModel
      Sets radius of a pie, in pixels or percents. By default, radius is calculated automatically.
      Specified by:
      setRadius in interface PieChartModel<PieChart>
      Parameters:
      radius - the radius of a pie
      Returns:
      pie chart model
    • getStartAngle

      public Integer getStartAngle()
      Specified by:
      getStartAngle in interface PieChartModel<PieChart>
      Returns:
      angle of the first slice
    • setStartAngle

      public PieChart setStartAngle(Integer startAngle)
      Description copied from interface: PieChartModel
      Sets angle of the first slice, in degrees. This will work properly only if depth3D is set to 0. If depth3D is greater than 0, then there can be two angles only: 90 and 270. Value range is 0-360. If not set the default value is 90.
      Specified by:
      setStartAngle in interface PieChartModel<PieChart>
      Parameters:
      startAngle - angle of the first slice in degree
      Returns:
      pie chart model
    • getStartRadius

      public String getStartRadius()
      Specified by:
      getStartRadius in interface PieChartModel<PieChart>
      Returns:
      start radius
    • setStartRadius

      public PieChart setStartRadius(String startRadius)
      Description copied from interface: PieChartModel
      Sets radius of the positions from which the slices will fly in. If not set the default value is 500%.
      Specified by:
      setStartRadius in interface PieChartModel<PieChart>
      Parameters:
      startRadius - the start radius
      Returns:
      pie chart model
    • getAdjustPrecision

      public Boolean getAdjustPrecision()
      Specified by:
      getAdjustPrecision in interface PieChartModel<PieChart>
      Returns:
      true if adjust precision is enabled
    • setAdjustPrecision

      public PieChart setAdjustPrecision(Boolean adjustPrecision)
      Description copied from interface: PieChartModel
      Set this to true, when percent of a sum of all slices is not equal to 100%, number of decimals will be increased so that sum would become 100%. It can happen because of a rounding. If not set the default value is false.
      Specified by:
      setAdjustPrecision in interface PieChartModel<PieChart>
      Parameters:
      adjustPrecision - adjust precision option
      Returns:
      pie chart model
    • getBalloonFunction

      public JsFunction getBalloonFunction()
      Specified by:
      getBalloonFunction in interface PieChartModel<PieChart>
      Returns:
      function
    • setBalloonFunction

      public PieChart setBalloonFunction(JsFunction balloonFunction)
      Description copied from interface: PieChartModel
      Sets the function, the graph will call it and pass GraphDataItem object to it. This function should return a string which will be displayed in a balloon.
      Specified by:
      setBalloonFunction in interface PieChartModel<PieChart>
      Parameters:
      balloonFunction - the balloon function
      Returns:
      pie chart model
    • getGradientType

      public GradientType getGradientType()
      Specified by:
      getGradientType in interface PieChartModel<PieChart>
      Returns:
      gradient type
    • setGradientType

      public PieChart setGradientType(GradientType gradientType)
      Description copied from interface: PieChartModel
      Sets type of gradient. Use gradientRatio to create gradients. If not set the default value is RADIAL.
      Specified by:
      setGradientType in interface PieChartModel<PieChart>
      Parameters:
      gradientType - the gradient type
      Returns:
      pie chart model