Package io.jmix.charts.model.chart.impl
Class PieChartModelImpl
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.chart.impl.ChartModelImpl
io.jmix.charts.model.chart.impl.AbstractChart<T>
io.jmix.charts.model.chart.impl.SlicedChartModelImpl<PieChartModelImpl>
io.jmix.charts.model.chart.impl.PieChartModelImpl
- All Implemented Interfaces:
HasStartEffect<PieChartModelImpl>
,ChartModel<PieChartModelImpl>
,PieChartModel<PieChartModelImpl>
,SlicedChartModel<PieChartModelImpl>
,HasColors<PieChartModelImpl>
,HasMargins<PieChartModelImpl>
,Serializable
public class PieChartModelImpl
extends SlicedChartModelImpl<PieChartModelImpl>
implements PieChartModel<PieChartModelImpl>
See documentation for properties of AmPieChart JS object.
http://docs.amcharts.com/3/javascriptcharts/AmPieChart
http://docs.amcharts.com/3/javascriptcharts/AmPieChart
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.charts.model.chart.impl.AbstractChart
AbstractChart.DataProviderChangeListener
-
Constructor Summary
-
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 class io.jmix.charts.model.chart.impl.SlicedChartModelImpl
addColors, addGradientRatio, getAccessibleLabel, getAlpha, getAlphaField, getBaseColor, getClassNameField, getColorField, getColors, getDescriptionField, getGradientRatio, getGroupedAlpha, getGroupedColor, getGroupedDescription, getGroupedPulled, getGroupedTitle, getGroupPercent, getHideLabelsPercent, getHoverAlpha, getLabelColorField, getLabelFunction, getLabelsEnabled, getLabelTickAlpha, getLabelTickColor, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxLabelWidth, getOutlineAlpha, getOutlineColor, getOutlineThickness, getPatternField, getPulledField, getPullOutDuration, getPullOutEffect, getPullOutOnlyOne, getSequencedAnimation, getShowZeroSlices, getStartAlpha, getStartDuration, getStartEffect, getTabIndex, getTitleField, getUrlField, getUrlTarget, getValueField, getVisibleInLegendField, setAccessibleLabel, setAlpha, setAlphaField, setBaseColor, setClassNameField, setColorField, setColors, setDescriptionField, setGradientRatio, setGroupedAlpha, setGroupedColor, setGroupedDescription, setGroupedPulled, setGroupedTitle, setGroupPercent, setHideLabelsPercent, setHoverAlpha, setLabelColorField, setLabelFunction, setLabelsEnabled, setLabelTickAlpha, setLabelTickColor, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxLabelWidth, setOutlineAlpha, setOutlineColor, setOutlineThickness, setPatternField, setPulledField, setPullOutDuration, setPullOutEffect, setPullOutOnlyOne, setSequencedAnimation, setShowZeroSlices, setStartAlpha, setStartDuration, setStartEffect, setTabIndex, setTitleField, setUrlField, setUrlTarget, setValueField, setVisibleInLegendField
Methods inherited from class io.jmix.charts.model.chart.impl.AbstractChart
addAdditionalFields, addData, addDataProviderChangeListener, addLabels, addPrefixesOfBigNumbers, addPrefixesOfSmallNumbers, addTitles, fireDataProviderChanged, 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, getType, getUsePrefixes, removeDataProviderSetListener, 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
-
Constructor Details
-
PieChartModelImpl
public PieChartModelImpl()
-
-
Method Details
-
getAngle
- Specified by:
getAngle
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- angle
-
setAngle
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
angle
- the angle- Returns:
- pie chart model
-
getBalloonText
- Specified by:
getBalloonText
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- balloon text
-
setBalloonText
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
balloonText
- balloon text string- Returns:
- pie chart model
-
getDepth3D
- Specified by:
getDepth3D
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- depth of the pie
-
setDepth3D
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
depth3D
- the depth 3D- Returns:
- pie chart model
-
getInnerRadius
- Specified by:
getInnerRadius
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- inner radius of the pie
-
setInnerRadius
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
innerRadius
- inner radius in pixels or percents- Returns:
- pie chart model
-
getLabelRadius
- Specified by:
getLabelRadius
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- distance between the label and the slice, in pixels
-
setLabelRadius
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
labelRadius
- distance between the label and the slice, in pixels- Returns:
- pie chart model
-
getLabelRadiusField
- Specified by:
getLabelRadiusField
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- label radius field
-
setLabelRadiusField
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
labelRadiusField
- label radius field string- Returns:
- pie chart model
-
getLabelText
- Specified by:
getLabelText
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- label text
-
setLabelText
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
labelText
- label text string- Returns:
- pie chart model
-
getMinRadius
- Specified by:
getMinRadius
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- minimum radius
-
setMinRadius
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
minRadius
- the minimum radius- Returns:
- pie chart model
-
getPieAlpha
- Specified by:
getPieAlpha
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- opacity for a slices
-
setPieAlpha
Description copied from interface:PieChartModel
Sets opacity for a slices.- Specified by:
setPieAlpha
in interfacePieChartModel<PieChartModelImpl>
- Parameters:
pieAlpha
- the pie alpha- Returns:
- pie chart model
-
getPieX
- Specified by:
getPieX
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- X position of a pie center
-
setPieX
Description copied from interface:PieChartModel
Sets X position of a pie center, in pixels or in percents.- Specified by:
setPieX
in interfacePieChartModel<PieChartModelImpl>
- Parameters:
pieX
- X position of a pie center- Returns:
- pie chart model
-
getPieY
- Specified by:
getPieY
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- Y position of a pie center
-
setPieY
Description copied from interface:PieChartModel
Sets Y position of a pie center, in pixels or in percents.- Specified by:
setPieY
in interfacePieChartModel<PieChartModelImpl>
- Parameters:
pieY
- Y position of a pie center- Returns:
- pie chart model
-
getPullOutRadius
- Specified by:
getPullOutRadius
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- pull out radius
-
setPullOutRadius
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
pullOutRadius
- pull out radius- Returns:
- pie chart model
-
getRadius
- Specified by:
getRadius
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- radius
-
setRadius
Description copied from interface:PieChartModel
Sets radius of a pie, in pixels or percents. By default, radius is calculated automatically.- Specified by:
setRadius
in interfacePieChartModel<PieChartModelImpl>
- Parameters:
radius
- the radius of a pie- Returns:
- pie chart model
-
getStartAngle
- Specified by:
getStartAngle
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- angle of the first slice
-
setStartAngle
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
startAngle
- angle of the first slice in degree- Returns:
- pie chart model
-
getStartRadius
- Specified by:
getStartRadius
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- start radius
-
setStartRadius
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
startRadius
- the start radius- Returns:
- pie chart model
-
getAdjustPrecision
- Specified by:
getAdjustPrecision
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- true if adjust precision is enabled
-
setAdjustPrecision
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
adjustPrecision
- adjust precision option- Returns:
- pie chart model
-
getBalloonFunction
- Specified by:
getBalloonFunction
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- function
-
setBalloonFunction
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
balloonFunction
- the balloon function- Returns:
- pie chart model
-
getGradientType
- Specified by:
getGradientType
in interfacePieChartModel<PieChartModelImpl>
- Returns:
- gradient type
-
setGradientType
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 interfacePieChartModel<PieChartModelImpl>
- Parameters:
gradientType
- the gradient type- Returns:
- pie chart model
-
getWiredFields
- Overrides:
getWiredFields
in classSlicedChartModelImpl<PieChartModelImpl>
- Returns:
- fields of the
DataItem
that are bound to the chart
-