Package io.jmix.charts.model.chart
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
-
Method Summary
Modifier and TypeMethodDescriptiongetAngle()
getPieX()
getPieY()
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%.Sets pie lean angle (for 3D effect).setBalloonFunction
(JsFunction balloonFunction) Sets the function, the graph will call it and pass GraphDataItem object to it.setBalloonText
(String balloonText) Sets balloon text.setDepth3D
(Integer depth3D) Sets depth of the pie (for 3D effect).setGradientType
(GradientType gradientType) Sets type of gradient.setInnerRadius
(String innerRadius) Sets inner radius of the pie, in pixels or percents.setLabelRadius
(Integer labelRadius) Sets the distance between the label and the slice, in pixels.setLabelRadiusField
(String labelRadiusField) Sets name of the field from data provider which specifies the length of a tick.setLabelText
(String labelText) Sets label text.setMinRadius
(Integer minRadius) Sets minimum radius of the pie, in pixels.setPieAlpha
(Double pieAlpha) Sets opacity for a slices.Sets X position of a pie center, in pixels or in percents.Sets Y position of a pie center, in pixels or in percents.setPullOutRadius
(String pullOutRadius) Sets pull out radius, in pixels or percents.Sets radius of a pie, in pixels or percents.setStartAngle
(Integer startAngle) Sets angle of the first slice, in degrees.setStartRadius
(String startRadius) Sets radius of the positions from which the slices will fly in.Methods inherited from interface io.jmix.charts.model.chart.ChartModel
addAdditionalFields, addData, addLabels, addPrefixesOfBigNumbers, addPrefixesOfSmallNumbers, addTitles, getAccessible, getAccessibleDescription, getAccessibleTitle, getAddClassNames, getAdditionalFields, getAllLabels, getAutoDisplay, getAutoResize, getAutoTransform, getBackgroundAlpha, getBackgroundColor, getBalloon, getBorderAlpha, getBorderColor, getClassNamePrefix, getColor, getCreditsPosition, getDataProvider, getDecimalSeparator, getDefs, getExport, getFontFamily, getFontSize, getHandDrawn, getHandDrawScatter, getHandDrawThickness, getHideBalloonTime, getLanguage, getLegend, getPanEventsEnabled, getPath, getPathToImages, getPercentPrecision, getPrecision, getPrefixesOfBigNumbers, getPrefixesOfSmallNumbers, getProcessCount, getProcessTimeout, getResponsive, getSvgIcons, getTapToActivate, getTheme, getThousandsSeparator, getTitles, getTouchClickDuration, getUsePrefixes, setAccessible, setAccessibleDescription, setAccessibleTitle, setAddClassNames, setAdditionalFields, setAllLabels, setAutoDisplay, setAutoResize, setAutoTransform, setBackgroundAlpha, setBackgroundColor, setBalloon, setBorderAlpha, setBorderColor, setClassNamePrefix, setColor, setCreditsPosition, setDataProvider, setDecimalSeparator, setDefs, setExport, setFontFamily, setFontSize, setHandDrawn, setHandDrawScatter, setHandDrawThickness, setHideBalloonTime, setLanguage, setLegend, setPanEventsEnabled, setPath, setPathToImages, setPercentPrecision, setPrecision, setPrefixesOfBigNumbers, setPrefixesOfSmallNumbers, setProcessCount, setProcessTimeout, setResponsive, setSvgIcons, setTapToActivate, setTheme, setThousandsSeparator, setTitles, setTouchClickDuration, setUsePrefixes
Methods inherited from interface io.jmix.charts.model.HasMargins
getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop
Methods inherited from interface io.jmix.charts.model.animation.HasStartEffect
getStartDuration, getStartEffect, setStartDuration, setStartEffect
Methods inherited from interface io.jmix.charts.model.chart.SlicedChartModel
addGradientRatio, getAccessibleLabel, getAlpha, getAlphaField, getBaseColor, getClassNameField, getColorField, getDescriptionField, getGradientRatio, getGroupedAlpha, getGroupedColor, getGroupedDescription, getGroupedPulled, getGroupedTitle, getGroupPercent, getHideLabelsPercent, getHoverAlpha, getLabelColorField, getLabelFunction, getLabelsEnabled, getLabelTickAlpha, getLabelTickColor, getMaxLabelWidth, getOutlineAlpha, getOutlineColor, getOutlineThickness, getPatternField, getPulledField, getPullOutDuration, getPullOutEffect, getPullOutOnlyOne, getSequencedAnimation, getShowZeroSlices, getStartAlpha, getTabIndex, getTitleField, getUrlField, getUrlTarget, getValueField, getVisibleInLegendField, setAccessibleLabel, setAlpha, setAlphaField, setBaseColor, setClassNameField, setColorField, setDescriptionField, setGradientRatio, setGroupedAlpha, setGroupedColor, setGroupedDescription, setGroupedPulled, setGroupedTitle, setGroupPercent, setHideLabelsPercent, setHoverAlpha, setLabelColorField, setLabelFunction, setLabelsEnabled, setLabelTickAlpha, setLabelTickColor, setMaxLabelWidth, setOutlineAlpha, setOutlineColor, setOutlineThickness, setPatternField, setPulledField, setPullOutDuration, setPullOutEffect, setPullOutOnlyOne, setSequencedAnimation, setShowZeroSlices, setStartAlpha, setTabIndex, setTitleField, setUrlField, setUrlTarget, setValueField, setVisibleInLegendField
-
Method Details
-
getAngle
Integer getAngle()- Returns:
- angle
-
setAngle
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
-