Package quadbase.util
Interface IPiePropertySet
- All Known Subinterfaces:
IDoughnutPropertySet
public interface IPiePropertySet
This interface is used to modify properties associated with a pie chart.
A handle to an object that implements this interface can be obtained by calling the
gethPieProperties method defined in QbChart.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the color that is used for pie chart's outside invalid input: '&' slice borders.Color[]doubleget display name for "Others"floatReturns the pie slice explode distance from the origin.doubleReturns the gap ratio between pies Default is 0.5gethCategoryLabel(int pieId) Used to get a handle to ILabel, which is used to set properties associated with the category label for pie.gethLabel(int sliceId) Used to get a handle to ILabel, which is used to set properties associated with the label for a pie slice.gethLabel(int pieId, int sliceId) Used to get a handle to ILabel, which is used to set properties associated with the label for a pie slice.gethPercentLabel(int sliceId) Used to get a handle to ILabel, which is used to set properties associated with the percent label for a pie slice.gethPercentLabel(int pieId, int sliceId) Used to get a handle to ILabel, which is used to set properties associated with the percent label for a pie slice.gethValueLabel(int sliceId) Used to get a handle to ILabel, which is used to set properties associated with the value labels for a pie slice.gethValueLabel(int pieId, int sliceId) Used to get a handle to ILabel, which is used to set properties associated with the value labels for a pie slice.floatReturns the pie slice label's distance from the origin, in terms of the pie radius.doubleGet "others" % threshold it groups all the sectors which below threshold percent togetherintReturns number of pies are drawn in one row Default is 1intGets the rotation angle of the pie chart in degrees.intReturns the total number of sectors drawn in the 3D chart.charReturns the char that is used to separate the category invalid input: '&' percentage value strings in the legend.booleanisBestFit(boolean b) Returns whether pies are drawn in best fit format Default is truebooleanRetruns whether pies are drawn linearly Default is falsebooleanisExploded(int sliceId) Returns whether or not the particular pie-slice is exploded or not.booleanReturns whether or not the particular pie-slice is exploded using sector gap or not.booleanReturns whether connecting line is drawn between individual pie slice invalid input: '&' its own label.booleanReturns whether or not pie slice percentages are visible in the chart legend.booleanReturns whether align pie labels at the side Default is falsebooleanReturns whether or not pie slice radial borders are visible for slices that occupy either 0%, or 100%.booleanReturns whether or not pie slice values are visible in the chart legend.booleanReturns whether or not pie slice labels are visible for slices that occupy 0%.voidsetBestFit(boolean b) Specifies whether pies are drawn in best fit format Default is truevoidsetBorderColor(Color color) Specifies the color that is used for pie chart's outside invalid input: '&' slice borders.voidsetColorArrayForPieThreshold(Color[] colors) voidsetColorThresholdForPie(double i) voidset display name for "Others"voidsetDrawLinearly(boolean b) Specifies whether pies are drawn linearly Default is falsevoidsetExploded(int sliceId, boolean b) Enables/Disables the explosion of the particular slice.voidsetExplodeRadialPos(float x) Sets the pie slice explode distance from the origin.voidsetExplodeUsingSectorGap(boolean b) Enables/Disables the explosion of the particular slice using sector gap.voidsetExtendLineDrawn(boolean drawn) Specifies whether connecting line is drawn between individual pie slice invalid input: '&' its own label.voidsetGapRatioBetweenPies(double ratio) Specifies the gap ratio between pies Default is 0.5voidsetLabelRadialPos(float pos) Sets the pie label distance from the origin, in terms of the pie radius.voidsetOthersThresholdPercentage(double threshold) Set "Others" % threshold it groups all the sectors which below threshold percent togethervoidsetPercentVisibleInLegend(boolean b) Sets whether or not to display pie slice percentages in the chart legend.voidsetPieLabelAtTheSide(boolean atTheSide) Specifies whether align pie labels at the side Default is falsevoidsetPiePerRow(int nPie) Specifies number of pies are drawn in one row Default is 1voidsetRadialBorderDrawnForZero(boolean b) Specifies whether or not pie slice radial borders are visible for slices that occupy either 0%, or 100%.voidsetRotationAngle(int angle) Sets the pie rotation angle in degrees.voidsetSectorCount(int numSectors) Sets the sector count for a 3D pie chart.voidsetSepSymbol(char c) Specifies the char to be used to separate the category invalid input: '&' percentage value strings in the legend.voidsetValueVisibleInLegend(boolean b) Sets whether or not to display pie slice values in the chart legend.voidsetZeroLabelsVisible(boolean b) Specifies whether or not pie slice labels are visible for slices that occupy 0%.
-
Method Details
-
getRotationAngle
int getRotationAngle()Gets the rotation angle of the pie chart in degrees.- Returns:
- The rotate angle in degrees.
-
setRotationAngle
void setRotationAngle(int angle) Sets the pie rotation angle in degrees.Associated QbChart property: PIE_ROTATEANGLE
- Parameters:
angle- The anticlockwise rotation angle in degrees.
-
isExploded
boolean isExploded(int sliceId) Returns whether or not the particular pie-slice is exploded or not.- Parameters:
sliceId- The id(row number) of the slice being checked. The id represents the position of the slice in the category column array.- Returns:
- True if the slice is exploded, false otherwise.
-
setExploded
void setExploded(int sliceId, boolean b) Enables/Disables the explosion of the particular slice.Associated QbChart property: PIE_SLICE
- Parameters:
sliceId- The id of the slice being exploded/imploded.b- set to true if slice should be exploded, false otherwise.
-
isExplodeUsingSectorGap
boolean isExplodeUsingSectorGap()Returns whether or not the particular pie-slice is exploded using sector gap or not.- Returns:
- True if the slice is exploded using sector gap, false otherwise.
-
setExplodeUsingSectorGap
void setExplodeUsingSectorGap(boolean b) Enables/Disables the explosion of the particular slice using sector gap.- Parameters:
b- set to true if slice should be exploded using sector gap, false otherwise.
-
getExplodeRadialPos
float getExplodeRadialPos()Returns the pie slice explode distance from the origin. i.e. How far the slice should be exploded. Default value is 0.4- Returns:
- The explode distance of pie slices from the origin.
-
setExplodeRadialPos
void setExplodeRadialPos(float x) Sets the pie slice explode distance from the origin. The value set is in terms of the pie radius and should be between 0 and 2.Associated QbChart property: PIE_SLICEDISTANCE
- Parameters:
x- The explode distance in terms of the radius (0 to 2).
-
gethLabel
Used to get a handle to ILabel, which is used to set properties associated with the label for a pie slice.- Parameters:
sliceId- The id of the slice (position in category column).- Returns:
- A handle to an object that implements ILabel
- See Also:
-
gethLabel
Used to get a handle to ILabel, which is used to set properties associated with the label for a pie slice.- Parameters:
pieId- The id of the pie (position in category column).sliceId- The id of the slice (position in series column).- Returns:
- A handle to an object that implements ILabel
- See Also:
-
getLabelRadialPos
float getLabelRadialPos()Returns the pie slice label's distance from the origin, in terms of the pie radius.- Returns:
- The label distance from the origin (Range 0 to 2).
- See Also:
-
setLabelRadialPos
void setLabelRadialPos(float pos) Sets the pie label distance from the origin, in terms of the pie radius.- Parameters:
pos- The distance from origin at which labels should be drawn (0 to 2).- See Also:
-
gethValueLabel
Used to get a handle to ILabel, which is used to set properties associated with the value labels for a pie slice.- Parameters:
sliceId- The id of the slice (position in category column).- Returns:
- A handle to an object that implements ILabel
- See Also:
-
gethValueLabel
Used to get a handle to ILabel, which is used to set properties associated with the value labels for a pie slice.- Parameters:
pieId- The id of the pie (position in category column).sliceId- The id of the slice (position in series column).- Returns:
- A handle to an object that implements ILabel
- See Also:
-
gethPercentLabel
Used to get a handle to ILabel, which is used to set properties associated with the percent label for a pie slice.- Parameters:
sliceId- The id of the slice (position in category column).- Returns:
- A handle to an object that implements ILabel
- See Also:
-
gethPercentLabel
Used to get a handle to ILabel, which is used to set properties associated with the percent label for a pie slice.- Parameters:
pieId- The id of the pie (position in category column).sliceId- The id of the slice (position in series column).- Returns:
- A handle to an object that implements ILabel
- See Also:
-
gethCategoryLabel
Used to get a handle to ILabel, which is used to set properties associated with the category label for pie.- Parameters:
pieId- The id of the pie (position in category column).- Returns:
- A handle to an object that implements ILabel
- See Also:
-
getSectorCount
int getSectorCount()Returns the total number of sectors drawn in the 3D chart.- Returns:
- The total number of sectors for a 3D chart.
-
setSectorCount
void setSectorCount(int numSectors) Sets the sector count for a 3D pie chart. The more the number of sectors, the smoother is the chart.Associated QbChart property: PIE_SECTORS
- Parameters:
numSectors- The sector count.
-
isPercentVisibleInLegend
boolean isPercentVisibleInLegend()Returns whether or not pie slice percentages are visible in the chart legend.- Returns:
- True if percentages are visible in the legend, false otherwise.
-
setPercentVisibleInLegend
void setPercentVisibleInLegend(boolean b) Sets whether or not to display pie slice percentages in the chart legend.Associated QbChart property: PIE_PERCENTLEGEND
- Parameters:
b- The boolean state for percentages in the legend.
-
isValueVisibleInLegend
boolean isValueVisibleInLegend()Returns whether or not pie slice values are visible in the chart legend.- Returns:
- True if values are visible in the legend, false otherwise.
-
setValueVisibleInLegend
void setValueVisibleInLegend(boolean b) Sets whether or not to display pie slice values in the chart legend.Associated QbChart property: PIE_VALUELEGEND
- Parameters:
b- The boolean state for values in the legend.
-
isRadialBorderDrawnForZero
boolean isRadialBorderDrawnForZero()Returns whether or not pie slice radial borders are visible for slices that occupy either 0%, or 100%.- Returns:
- True if such radial borders are visible, false otherwise.
-
setRadialBorderDrawnForZero
void setRadialBorderDrawnForZero(boolean b) Specifies whether or not pie slice radial borders are visible for slices that occupy either 0%, or 100%.- Parameters:
b- The boolean state for radial borders, true by default.
-
isZeroLabelsVisible
boolean isZeroLabelsVisible()Returns whether or not pie slice labels are visible for slices that occupy 0%.- Returns:
- True if such labels are visible, false otherwise.
-
setZeroLabelsVisible
void setZeroLabelsVisible(boolean b) Specifies whether or not pie slice labels are visible for slices that occupy 0%.- Parameters:
b- The boolean state for visible zero labels, true by default.
-
getSepSymbol
char getSepSymbol()Returns the char that is used to separate the category invalid input: '&' percentage value strings in the legend. Default is a ',' comma character.- Returns:
- symbol char.
-
setSepSymbol
void setSepSymbol(char c) Specifies the char to be used to separate the category invalid input: '&' percentage value strings in the legend. Default is a ',' comma character.- Parameters:
c- the new symbol to be used.
-
getBorderColor
Color getBorderColor()Returns the color that is used for pie chart's outside invalid input: '&' slice borders. Default is java.awt.Color.black. -
setBorderColor
Specifies the color that is used for pie chart's outside invalid input: '&' slice borders. Default is java.awt.Color.black. -
isExtendLineDrawn
boolean isExtendLineDrawn()Returns whether connecting line is drawn between individual pie slice invalid input: '&' its own label. Default is false -
setExtendLineDrawn
void setExtendLineDrawn(boolean drawn) Specifies whether connecting line is drawn between individual pie slice invalid input: '&' its own label. Default is false -
isPieLabelAtTheSide
boolean isPieLabelAtTheSide()Returns whether align pie labels at the side Default is false -
setPieLabelAtTheSide
void setPieLabelAtTheSide(boolean atTheSide) Specifies whether align pie labels at the side Default is false -
setPiePerRow
void setPiePerRow(int nPie) Specifies number of pies are drawn in one row Default is 1 -
getPiePerRow
int getPiePerRow()Returns number of pies are drawn in one row Default is 1 -
setDrawLinearly
void setDrawLinearly(boolean b) Specifies whether pies are drawn linearly Default is false -
isDrawLinearly
boolean isDrawLinearly()Retruns whether pies are drawn linearly Default is false -
setBestFit
void setBestFit(boolean b) Specifies whether pies are drawn in best fit format Default is true -
isBestFit
boolean isBestFit(boolean b) Returns whether pies are drawn in best fit format Default is true -
setGapRatioBetweenPies
void setGapRatioBetweenPies(double ratio) Specifies the gap ratio between pies Default is 0.5 -
getGapRatioBetweenPies
double getGapRatioBetweenPies()Returns the gap ratio between pies Default is 0.5 -
setOthersThresholdPercentage
void setOthersThresholdPercentage(double threshold) Set "Others" % threshold it groups all the sectors which below threshold percent together -
getOthersThresholdPercentage
double getOthersThresholdPercentage()Get "others" % threshold it groups all the sectors which below threshold percent together -
setDisplayNameForOthers
set display name for "Others" -
getDisplayNameForOthers
String getDisplayNameForOthers()get display name for "Others" -
getColorThresholdForPie
double getColorThresholdForPie() -
setColorThresholdForPie
void setColorThresholdForPie(double i) -
getColorArrayForPieThreshold
Color[] getColorArrayForPieThreshold() -
setColorArrayForPieThreshold
-