Interface PieChartModel<T extends PieChartModel>

All Superinterfaces:
ChartModel<T>, HasColors<T>, HasMargins<T>, HasStartEffect<T>, SlicedChartModel<T>
All Known Subinterfaces:
PieChart
All Known Implementing Classes:
PieChartImpl, PieChartModelImpl

public interface PieChartModel<T extends PieChartModel> extends SlicedChartModel<T>
  • Method Details

    • getAngle

      Integer getAngle()
      Returns:
      angle
    • setAngle

      @StudioProperty(defaultValue="0") @Max(90L) @Min(0L) T setAngle(Integer angle)
      Sets pie lean angle (for 3D effect). Valid range is 0 - 90. If not set the default value is 0.
      Parameters:
      angle - the angle
      Returns:
      pie chart model
    • getBalloonText

      String getBalloonText()
      Returns:
      balloon text
    • setBalloonText

      @StudioProperty(defaultValue="[[title]]: [[percents]]% ([[value]])\n[[description]]") T setBalloonText(String balloonText)
      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]]".
      Parameters:
      balloonText - balloon text string
      Returns:
      pie chart model
    • getDepth3D

      Integer getDepth3D()
      Returns:
      depth of the pie
    • setDepth3D

      @StudioProperty(defaultValue="0") T setDepth3D(Integer depth3D)
      Sets depth of the pie (for 3D effect). If not set the default value is 0.
      Parameters:
      depth3D - the depth 3D
      Returns:
      pie chart model
    • getInnerRadius

      String getInnerRadius()
      Returns:
      inner radius of the pie
    • setInnerRadius

      @StudioProperty(defaultValue="0") T setInnerRadius(String innerRadius)
      Sets inner radius of the pie, in pixels or percents. If not set the default value is 0.
      Parameters:
      innerRadius - inner radius in pixels or percents
      Returns:
      pie chart model
    • getLabelRadius

      Integer getLabelRadius()
      Returns:
      distance between the label and the slice, in pixels
    • setLabelRadius

      @StudioProperty(defaultValue="20") T setLabelRadius(Integer labelRadius)
      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.
      Parameters:
      labelRadius - distance between the label and the slice, in pixels
      Returns:
      pie chart model
    • getLabelRadiusField

      String getLabelRadiusField()
      Returns:
      label radius field
    • setLabelRadiusField

      @StudioProperty(type=PROPERTY_PATH_REF) T setLabelRadiusField(String labelRadiusField)
      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.
      Parameters:
      labelRadiusField - label radius field string
      Returns:
      pie chart model
    • getLabelText

      String getLabelText()
      Returns:
      label text
    • setLabelText

      @StudioProperty(defaultValue="[[title]]: [[percents]]%") T setLabelText(String labelText)
      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]]%".
      Parameters:
      labelText - label text string
      Returns:
      pie chart model
    • getMinRadius

      Integer getMinRadius()
      Returns:
      minimum radius
    • setMinRadius

      @StudioProperty(defaultValue="10") @PositiveOrZero T setMinRadius(Integer minRadius)
      Sets minimum radius of the pie, in pixels. If not set the default value is 10.
      Parameters:
      minRadius - the minimum radius
      Returns:
      pie chart model
    • getPieAlpha

      Double getPieAlpha()
      Returns:
      opacity for a slices
    • setPieAlpha

      @StudioProperty T setPieAlpha(Double pieAlpha)
      Sets opacity for a slices.
      Parameters:
      pieAlpha - the pie alpha
      Returns:
      pie chart model
    • getPieX

      String getPieX()
      Returns:
      X position of a pie center
    • setPieX

      @StudioProperty T setPieX(String pieX)
      Sets X position of a pie center, in pixels or in percents.
      Parameters:
      pieX - X position of a pie center
      Returns:
      pie chart model
    • getPieY

      String getPieY()
      Returns:
      Y position of a pie center
    • setPieY

      @StudioProperty T setPieY(String pieY)
      Sets Y position of a pie center, in pixels or in percents.
      Parameters:
      pieY - Y position of a pie center
      Returns:
      pie chart model
    • getPullOutRadius

      String getPullOutRadius()
      Returns:
      pull out radius
    • setPullOutRadius

      @StudioProperty(defaultValue="20%") T setPullOutRadius(String pullOutRadius)
      Sets pull out radius, in pixels or percents. If not set the default value is 20%.
      Parameters:
      pullOutRadius - pull out radius
      Returns:
      pie chart model
    • getRadius

      String getRadius()
      Returns:
      radius
    • setRadius

      @StudioProperty T setRadius(String radius)
      Sets radius of a pie, in pixels or percents. By default, radius is calculated automatically.
      Parameters:
      radius - the radius of a pie
      Returns:
      pie chart model
    • getStartAngle

      Integer getStartAngle()
      Returns:
      angle of the first slice
    • setStartAngle

      @StudioProperty(defaultValue="90") @Max(360L) @Min(0L) T setStartAngle(Integer startAngle)
      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.
      Parameters:
      startAngle - angle of the first slice in degree
      Returns:
      pie chart model
    • getStartRadius

      String getStartRadius()
      Returns:
      start radius
    • setStartRadius

      @StudioProperty(defaultValue="500%") T setStartRadius(String startRadius)
      Sets radius of the positions from which the slices will fly in. If not set the default value is 500%.
      Parameters:
      startRadius - the start radius
      Returns:
      pie chart model
    • getAdjustPrecision

      Boolean getAdjustPrecision()
      Returns:
      true if adjust precision is enabled
    • setAdjustPrecision

      @StudioProperty(defaultValue="false") T setAdjustPrecision(Boolean adjustPrecision)
      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.
      Parameters:
      adjustPrecision - adjust precision option
      Returns:
      pie chart model
    • getBalloonFunction

      JsFunction getBalloonFunction()
      Returns:
      function
    • setBalloonFunction

      T setBalloonFunction(JsFunction balloonFunction)
      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.
      Parameters:
      balloonFunction - the balloon function
      Returns:
      pie chart model
    • getGradientType

      GradientType getGradientType()
      Returns:
      gradient type
    • setGradientType

      T setGradientType(GradientType gradientType)
      Sets type of gradient. Use gradientRatio to create gradients. If not set the default value is RADIAL.
      Parameters:
      gradientType - the gradient type
      Returns:
      pie chart model