EspressChart
v 5.5

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
 java.awt.Color getBorderColor()
          Returns the color that is used for pie chart's outside & slice borders.
 java.awt.Color[] getColorArrayForPieThreshold()
           
 double getColorThresholdForPie()
           
 java.lang.String getDisplayNameForOthers()
          get display name for "Others"
 float getExplodeRadialPos()
          Returns the pie slice explode distance from the origin.
 double getGapRatioBetweenPies()
          Returns the gap ratio between pies Default is 0.5
 ILabel gethCategoryLabel(int pieId)
          Used to get a handle to ILabel, which is used to set properties associated with the category label for pie.
 ILabel gethLabel(int sliceId)
          Used to get a handle to ILabel, which is used to set properties associated with the label for a pie slice.
 ILabel 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.
 ILabel 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.
 ILabel 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.
 ILabel 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.
 ILabel 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.
 float getLabelRadialPos()
          Returns the pie slice label's distance from the origin, in terms of the pie radius.
 double getOthersThresholdPercentage()
          Get "others" % threshold it groups all the sectors which below threshold percent together
 int getPiePerRow()
          Returns number of pies are drawn in one row Default is 1
 int getRepeatArcCount()
          Returns the number of draw arc repetitions.
 int getRotationAngle()
          Gets the rotation angle of the pie chart in degrees.
 int getSectorCount()
          Returns the total number of sectors drawn in the 3D chart.
 char getSepSymbol()
          Returns the char that is used to separate the category & percentage value strings in the legend.
 boolean isBestFit(boolean b)
          Returns whether pies are drawn in best fit format Default is true
 boolean isDrawLinearly()
          Retruns whether pies are drawn linearly Default is false
 boolean isExploded(int sliceId)
          Returns whether or not the particular pie-slice is exploded or not.
 boolean isExplodeUsingSectorGap()
          Returns whether or not the particular pie-slice is exploded using sector gap or not.
 boolean isExtendLineDrawn()
          Returns whether connecting line is drawn between individual pie slice & its own label.
 boolean isPercentVisibleInLegend()
          Returns whether or not pie slice percentages are visible in the chart legend.
 boolean isPieLabelAtTheSide()
          Returns whether align pie labels at the side Default is false
 boolean isRadialBorderDrawnForZero()
          Returns whether or not pie slice radial borders are visible for slices that occupy either 0%, or 100%.
 boolean isValueVisibleInLegend()
          Returns whether or not pie slice values are visible in the chart legend.
 boolean isZeroLabelsVisible()
          Returns whether or not pie slice labels are visible for slices that occupy 0%.
 void setBestFit(boolean b)
          Specifies whether pies are drawn in best fit format Default is true
 void setBorderColor(java.awt.Color color)
          Specifies the color that is used for pie chart's outside & slice borders.
 void setColorArrayForPieThreshold(java.awt.Color[] colors)
           
 void setColorThresholdForPie(double i)
           
 void setDisplayNameForOthers(java.lang.String name)
          set display name for "Others"
 void setDrawLinearly(boolean b)
          Specifies whether pies are drawn linearly Default is false
 void setExploded(int sliceId, boolean b)
          Enables/Disables the explosion of the particular slice.
 void setExplodeRadialPos(float x)
          Sets the pie slice explode distance from the origin.
 void setExplodeUsingSectorGap(boolean b)
          Enables/Disables the explosion of the particular slice using sector gap.
 void setExtendLineDrawn(boolean drawn)
          Specifies whether connecting line is drawn between individual pie slice & its own label.
 void setGapRatioBetweenPies(double ratio)
          Specifies the gap ratio between pies Default is 0.5
 void setLabelRadialPos(float pos)
          Sets the pie label distance from the origin, in terms of the pie radius.
 void setOthersThresholdPercentage(double threshold)
          Set "Others" % threshold it groups all the sectors which below threshold percent together
 void setPercentVisibleInLegend(boolean b)
          Sets whether or not to display pie slice percentages in the chart legend.
 void setPieLabelAtTheSide(boolean atTheSide)
          Specifies whether align pie labels at the side Default is false
 void setPiePerRow(int nPie)
          Specifies number of pies are drawn in one row Default is 1
 void setRadialBorderDrawnForZero(boolean b)
          Specifies whether or not pie slice radial borders are visible for slices that occupy either 0%, or 100%.
 void setRepeatArcCount(int numRep)
          Sets the number of repetitions of drawing the arc.
 void setRotationAngle(int angle)
          Sets the pie rotation angle in degrees.
 void setSectorCount(int numSectors)
          Sets the sector count for a 3D pie chart.
 void setSepSymbol(char c)
          Specifies the char to be used to separate the category & percentage value strings in the legend.
 void setValueVisibleInLegend(boolean b)
          Sets whether or not to display pie slice values in the chart legend.
 void setZeroLabelsVisible(boolean b)
          Specifies whether or not pie slice labels are visible for slices that occupy 0%.
 

Method Detail

getRotationAngle

public int getRotationAngle()
Gets the rotation angle of the pie chart in degrees.
Returns:
The rotate angle in degrees.

setRotationAngle

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public ILabel gethLabel(int sliceId)
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:
ILabel

gethLabel

public ILabel 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.
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:
ILabel

getLabelRadialPos

public 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:
getExplodeRadialPos()

setLabelRadialPos

public 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:
setExplodeRadialPos(float)

gethValueLabel

public ILabel 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.
Parameters:
sliceId - The id of the slice (position in category column).
Returns:
A handle to an object that implements ILabel
See Also:
ILabel

gethValueLabel

public ILabel 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.
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:
ILabel

gethPercentLabel

public ILabel 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.
Parameters:
sliceId - The id of the slice (position in category column).
Returns:
A handle to an object that implements ILabel
See Also:
ILabel

gethPercentLabel

public ILabel 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.
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:
ILabel

gethCategoryLabel

public ILabel gethCategoryLabel(int pieId)
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:
ILabel

getSectorCount

public int getSectorCount()
Returns the total number of sectors drawn in the 3D chart.
Returns:
The total number of sectors for a 3D chart.

setSectorCount

public 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

public 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

public 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

public 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

public 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

public 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

public 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.

getRepeatArcCount

public int getRepeatArcCount()
Returns the number of draw arc repetitions.
Returns:
The number of times arcs are drawn in repetitions.

setRepeatArcCount

public void setRepeatArcCount(int numRep)
Sets the number of repetitions of drawing the arc. Higher repetition count leads to less speckles effects--white dots around the pie borders.

Parameters:
numRep - The repetitions count.

isZeroLabelsVisible

public 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

public 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

public char getSepSymbol()
Returns the char that is used to separate the category & percentage value strings in the legend. Default is a ',' comma character.
Returns:
symbol char.

setSepSymbol

public void setSepSymbol(char c)
Specifies the char to be used to separate the category & percentage value strings in the legend. Default is a ',' comma character.
Parameters:
c - the new symbol to be used.

getBorderColor

public java.awt.Color getBorderColor()
Returns the color that is used for pie chart's outside & slice borders. Default is java.awt.Color.black.

setBorderColor

public void setBorderColor(java.awt.Color color)
Specifies the color that is used for pie chart's outside & slice borders. Default is java.awt.Color.black.

isExtendLineDrawn

public boolean isExtendLineDrawn()
Returns whether connecting line is drawn between individual pie slice & its own label. Default is false

setExtendLineDrawn

public void setExtendLineDrawn(boolean drawn)
Specifies whether connecting line is drawn between individual pie slice & its own label. Default is false

isPieLabelAtTheSide

public boolean isPieLabelAtTheSide()
Returns whether align pie labels at the side Default is false

setPieLabelAtTheSide

public void setPieLabelAtTheSide(boolean atTheSide)
Specifies whether align pie labels at the side Default is false

setPiePerRow

public void setPiePerRow(int nPie)
Specifies number of pies are drawn in one row Default is 1

getPiePerRow

public int getPiePerRow()
Returns number of pies are drawn in one row Default is 1

setDrawLinearly

public void setDrawLinearly(boolean b)
Specifies whether pies are drawn linearly Default is false

isDrawLinearly

public boolean isDrawLinearly()
Retruns whether pies are drawn linearly Default is false

setBestFit

public void setBestFit(boolean b)
Specifies whether pies are drawn in best fit format Default is true

isBestFit

public boolean isBestFit(boolean b)
Returns whether pies are drawn in best fit format Default is true

setGapRatioBetweenPies

public void setGapRatioBetweenPies(double ratio)
Specifies the gap ratio between pies Default is 0.5

getGapRatioBetweenPies

public double getGapRatioBetweenPies()
Returns the gap ratio between pies Default is 0.5

setOthersThresholdPercentage

public void setOthersThresholdPercentage(double threshold)
Set "Others" % threshold it groups all the sectors which below threshold percent together

getOthersThresholdPercentage

public double getOthersThresholdPercentage()
Get "others" % threshold it groups all the sectors which below threshold percent together

setDisplayNameForOthers

public void setDisplayNameForOthers(java.lang.String name)
set display name for "Others"

getDisplayNameForOthers

public java.lang.String getDisplayNameForOthers()
get display name for "Others"

getColorThresholdForPie

public double getColorThresholdForPie()

setColorThresholdForPie

public void setColorThresholdForPie(double i)

getColorArrayForPieThreshold

public java.awt.Color[] getColorArrayForPieThreshold()

setColorArrayForPieThreshold

public void setColorArrayForPieThreshold(java.awt.Color[] colors)

EspressChart
v 5.5