Chart FX for Java 6.2

SoftwareFX.ChartFX
Class Pie

java.lang.Object
  extended bySoftwareFX.ChartFX.Pie
All Implemented Interfaces:
IGalleryType

public final class Pie
extends java.lang.Object
implements IGalleryType

Provides access to the Pie gallery object.

The properties of the Pie class allow you to customize the visual attributes of a pie chart. In order to make the supported members available, you must first create a 'Pie' gallery object:

Pie myPie = (Pie) chart1.getGalleryObj();

Once this has been done, using the newly created object you can assign these special attributes for the Pie gallery in your chart.

In order to use this properly, you will need to set the gallery for the chart to Pie.


Constructor Summary
Pie()
           
 
Method Summary
 short getDoughnutThickness()
          Controls the thickness of the doughnut as a percentage of the outside radius.
 int getExplodingMode()
          Allows you to set how the slices of a pie chart are displayed.
 short getLineBreak()
          Controls the distance between the series in a stacked pie/doughnut chart.
 int getMinPercentage()
          Specifies the minimum percentage the chart will reduce itself to accomodate label size when PointLabels is turned on.
 short getSliceSeparation()
          Used to set the pie slice separation when using the ExplodingMode property.
 boolean isLabelsInside()
          Used to paint the point labels directly on the corresponding slice of a Pie chart.
 boolean isShadows()
          Adds a shadow effect to a 2D pie chart.
 boolean isShowLines()
          Used to show or hide lines in a Pie chart.
 boolean isSquare()
          Forces pie charts to be contained in a perfect square (no matter the window proportion).
 boolean isStacked()
          Gets or sets a Boolean value specifying whether or not to stack a pie/doughnut chart.
 void setDoughnutThickness(short value)
          Controls the thickness of the doughnut as a percentage of the outside radius.
 void setExplodingMode(int value)
          Allows you to set how the slices of a pie chart are displayed.
 void setLabelsInside(boolean value)
          Used to paint the point labels directly on the corresponding slice of a Pie chart.
 void setLineBreak(short value)
          Controls the distance between the series in a stacked pie/doughnut chart.
 void setMinPercentage(int value)
          Specifies the minimum percentage the chart will reduce itself to accomodate label size when PointLabels is turned on.
 void setShadows(boolean value)
          Adds a shadow effect to a 2D pie chart.
 void setShowLines(boolean value)
          Used to show or hide lines in a Pie chart.
 void setSliceSeparation(short value)
          Used to set the pie slice separation when using the ExplodingMode property.
 void setSquare(boolean value)
          Forces pie charts to be contained in a perfect square (no matter the window proportion).
 void setStacked(boolean value)
          Gets or sets a Boolean value specifying whether or not to stack a pie/doughnut chart.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pie

public Pie()
Method Detail

getDoughnutThickness

public short getDoughnutThickness()

Controls the thickness of the doughnut as a percentage of the outside radius.

Remarks:
  • The default value is 50 which means the radius of the hole is half of the radius of the outer wall. As this value decreases, the doughnut becomes thinner.

  • When the setStacked(boolean) property is set to true, a multi-series pie/doughnut chart will draw each series on top of each other (2D Only) instead of side-by-side.

  • This property is only available when a Pie gallery object is created:

    Pie myPie = (Pie) chart1.getGalleryObj();

  • ChartFX will give errors if the Chart.setGallery(int) is not set to pie/doughnut when using this property.

  • See Also:
    Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), setStacked(boolean), Chart

    getExplodingMode

    public int getExplodingMode()

    Allows you to set how the slices of a pie chart are displayed.

    Values:
    ExplodingMode : Pie exploding mode.
    ValueDescription
    NONEPie slices are not separated.
    ALLAll pie slices are separated.
    FIRSTOnly first pie slice is separated.
    LASTOnly last pie slice is separated.

    Remarks:
  • You can set the distance a slice will be separated from the pie chart using the setSliceSeparation(short) property.

  • Other pie gallery properties include setLabelsInside(boolean), setMinPercentage(int), setShadows(boolean), setShowLines(boolean) and setSquare(boolean).

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.

  • See Also:
    setLabelsInside(boolean), setMinPercentage(int), setShadows(boolean), setShowLines(boolean), setSliceSeparation(short), setSquare(boolean), Chart.setGallery(int), Chart

    getLineBreak

    public short getLineBreak()

    Controls the distance between the series in a stacked pie/doughnut chart.

    Remarks:
  • Setting the value of this property to a smaller value will increase the distance between series.

  • When the setStacked(boolean) property is set to true, a multi-series pie/doughnut charts will draw each series on top of each other (2D Only) instead of side-by-side.

  • Use the setDoughnutThickness(short) property to control the thickness of the doughnut as a percentage of the outside radius.

  • See Also:
    setDoughnutThickness(short), setStacked(boolean), Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), Chart, SeriesAttributes

    getMinPercentage

    public int getMinPercentage()

    Specifies the minimum percentage the chart will reduce itself to accomodate label size when PointLabels is turned on.

    Remarks:
  • This property is only available when a Pie gallery object is created:

    Pie myPie = (Pie) chart1.getGalleryObj();

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.Chart.setGallery(int)

  • See Also:
    Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), setLabelsInside(boolean), setShadows(boolean), setSquare(boolean), Chart

    getSliceSeparation

    public short getSliceSeparation()

    Used to set the pie slice separation when using the ExplodingMode property.

    Remarks:
  • You can set the setExplodingMode(int) property to control the style of the pie chart separation. You can select None, First, Last or All. None will have no separation, First will separate the first pie slice, Last separates the last slice and All separates all slices.

  • The configured value of this property is measured in pixels.

  • You can set the setLabelsInside(boolean), setMinPercentage(int), setShadows(boolean), setShowLines(boolean) and setSquare(boolean) properties for pie charts using the supported members of this class.

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.Chart.setGallery(int)

  • See Also:
    setExplodingMode(int), setLabelsInside(boolean), setMinPercentage(int), setShadows(boolean), setShowLines(boolean), setSquare(boolean), Chart.setGallery(int), Chart

    isLabelsInside

    public boolean isLabelsInside()

    Used to paint the point labels directly on the corresponding slice of a Pie chart.

    Remarks:
  • This property is only available when a Pie gallery object is created:

    Pie myPie = (Pie) chart1.getGalleryObj();

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.Chart.setGallery(int)

  • When point labels are painted outside of the Pie chart, lines will be added to improve chart readability.

  • See Also:
    Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), setMinPercentage(int), setShadows(boolean), setSquare(boolean), Chart

    isShadows

    public boolean isShadows()

    Adds a shadow effect to a 2D pie chart.

    Remarks:
  • This property is only available when a Pie gallery object is created:

    Pie myPie = (Pie) chart1.getGalleryObj();

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.Chart.setGallery(int)

  • When the Shadows property is applied to a 2D Pie chart, the outside edges of the pie appear rounded.

  • The pie chart must be in 2D mode for this property to have an effect.Chart.setGallery(int)

  • See Also:
    Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), setLabelsInside(boolean), setMinPercentage(int), setSquare(boolean), Chart

    isShowLines

    public boolean isShowLines()

    Used to show or hide lines in a Pie chart.

    Remarks:
  • This property is only available when a Pie gallery object has been created.

    Pie myPie = (Pie) chart1.getGalleryObj();

  • The Chart.setGallery(int) selected must be the same as the type of gallery object created using the Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType) property.

  • When used in conjunction with a Pie chart, this property shows or hides the lines drawn from point labels to their corresponding pie slice. If the labels are inside the pie, this property will have not effect on the chart.

  • See Also:
    Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), Chart

    isSquare

    public boolean isSquare()

    Forces pie charts to be contained in a perfect square (no matter the window proportion).

    Remarks:
  • This property is only available when a Pie gallery object is created:

    Pie myPie = (Pie) chart1.getGalleryObj();

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.Chart.setGallery(int)

  • See Also:
    Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), setLabelsInside(boolean), setMinPercentage(int), setShadows(boolean), Chart

    isStacked

    public boolean isStacked()

    Gets or sets a Boolean value specifying whether or not to stack a pie/doughnut chart.

    Remarks:
  • When set to true, a multi-sires pie/dougnut chart will draw each series on top of each other (2D Only) instead of side-by-side.

  • The PointAttributes.setVolume(short) property may be used to control the size of each series. Series 0 is painted behind the others, so it should be set as the largest (e.g. Volume = 100).

  • This property is only available when a Pie Chart.setGallery(int) object is created:

    Pie myPie = (Pie) chart1.getGalleryObj();

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.

  • See Also:
    setDoughnutThickness(short), PointAttributes.setVolume(short), Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), SeriesAttributes, Chart

    setDoughnutThickness

    public void setDoughnutThickness(short value)

    Controls the thickness of the doughnut as a percentage of the outside radius.

    Remarks:
  • The default value is 50 which means the radius of the hole is half of the radius of the outer wall. As this value decreases, the doughnut becomes thinner.

  • When the setStacked(boolean) property is set to true, a multi-series pie/doughnut chart will draw each series on top of each other (2D Only) instead of side-by-side.

  • This property is only available when a Pie gallery object is created:

    Pie myPie = (Pie) chart1.getGalleryObj();

  • ChartFX will give errors if the Chart.setGallery(int) is not set to pie/doughnut when using this property.

  • See Also:
    Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), setStacked(boolean), Chart

    setExplodingMode

    public void setExplodingMode(int value)

    Allows you to set how the slices of a pie chart are displayed.

    Values:
    ExplodingMode : Pie exploding mode.
    ValueDescription
    NONEPie slices are not separated.
    ALLAll pie slices are separated.
    FIRSTOnly first pie slice is separated.
    LASTOnly last pie slice is separated.

    Remarks:
  • You can set the distance a slice will be separated from the pie chart using the setSliceSeparation(short) property.

  • Other pie gallery properties include setLabelsInside(boolean), setMinPercentage(int), setShadows(boolean), setShowLines(boolean) and setSquare(boolean).

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.

  • See Also:
    setLabelsInside(boolean), setMinPercentage(int), setShadows(boolean), setShowLines(boolean), setSliceSeparation(short), setSquare(boolean), Chart.setGallery(int), Chart

    setLabelsInside

    public void setLabelsInside(boolean value)

    Used to paint the point labels directly on the corresponding slice of a Pie chart.

    Remarks:
  • This property is only available when a Pie gallery object is created:

    Pie myPie = (Pie) chart1.getGalleryObj();

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.Chart.setGallery(int)

  • When point labels are painted outside of the Pie chart, lines will be added to improve chart readability.

  • See Also:
    Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), setMinPercentage(int), setShadows(boolean), setSquare(boolean), Chart

    setLineBreak

    public void setLineBreak(short value)

    Controls the distance between the series in a stacked pie/doughnut chart.

    Remarks:
  • Setting the value of this property to a smaller value will increase the distance between series.

  • When the setStacked(boolean) property is set to true, a multi-series pie/doughnut charts will draw each series on top of each other (2D Only) instead of side-by-side.

  • Use the setDoughnutThickness(short) property to control the thickness of the doughnut as a percentage of the outside radius.

  • See Also:
    setDoughnutThickness(short), setStacked(boolean), Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), Chart, SeriesAttributes

    setMinPercentage

    public void setMinPercentage(int value)

    Specifies the minimum percentage the chart will reduce itself to accomodate label size when PointLabels is turned on.

    Remarks:
  • This property is only available when a Pie gallery object is created:

    Pie myPie = (Pie) chart1.getGalleryObj();

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.Chart.setGallery(int)

  • See Also:
    Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), setLabelsInside(boolean), setShadows(boolean), setSquare(boolean), Chart

    setShadows

    public void setShadows(boolean value)

    Adds a shadow effect to a 2D pie chart.

    Remarks:
  • This property is only available when a Pie gallery object is created:

    Pie myPie = (Pie) chart1.getGalleryObj();

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.Chart.setGallery(int)

  • When the Shadows property is applied to a 2D Pie chart, the outside edges of the pie appear rounded.

  • The pie chart must be in 2D mode for this property to have an effect.Chart.setGallery(int)

  • See Also:
    Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), setLabelsInside(boolean), setMinPercentage(int), setSquare(boolean), Chart

    setShowLines

    public void setShowLines(boolean value)

    Used to show or hide lines in a Pie chart.

    Remarks:
  • This property is only available when a Pie gallery object has been created.

    Pie myPie = (Pie) chart1.getGalleryObj();

  • The Chart.setGallery(int) selected must be the same as the type of gallery object created using the Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType) property.

  • When used in conjunction with a Pie chart, this property shows or hides the lines drawn from point labels to their corresponding pie slice. If the labels are inside the pie, this property will have not effect on the chart.

  • See Also:
    Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), Chart

    setSliceSeparation

    public void setSliceSeparation(short value)

    Used to set the pie slice separation when using the ExplodingMode property.

    Remarks:
  • You can set the setExplodingMode(int) property to control the style of the pie chart separation. You can select None, First, Last or All. None will have no separation, First will separate the first pie slice, Last separates the last slice and All separates all slices.

  • The configured value of this property is measured in pixels.

  • You can set the setLabelsInside(boolean), setMinPercentage(int), setShadows(boolean), setShowLines(boolean) and setSquare(boolean) properties for pie charts using the supported members of this class.

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.Chart.setGallery(int)

  • See Also:
    setExplodingMode(int), setLabelsInside(boolean), setMinPercentage(int), setShadows(boolean), setShowLines(boolean), setSquare(boolean), Chart.setGallery(int), Chart

    setSquare

    public void setSquare(boolean value)

    Forces pie charts to be contained in a perfect square (no matter the window proportion).

    Remarks:
  • This property is only available when a Pie gallery object is created:

    Pie myPie = (Pie) chart1.getGalleryObj();

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.Chart.setGallery(int)

  • See Also:
    Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), setLabelsInside(boolean), setMinPercentage(int), setShadows(boolean), Chart

    setStacked

    public void setStacked(boolean value)

    Gets or sets a Boolean value specifying whether or not to stack a pie/doughnut chart.

    Remarks:
  • When set to true, a multi-sires pie/dougnut chart will draw each series on top of each other (2D Only) instead of side-by-side.

  • The PointAttributes.setVolume(short) property may be used to control the size of each series. Series 0 is painted behind the others, so it should be set as the largest (e.g. Volume = 100).

  • This property is only available when a Pie Chart.setGallery(int) object is created:

    Pie myPie = (Pie) chart1.getGalleryObj();

  • ChartFX will give errors if the Chart.setGallery(int) is not set to Pie/Doughnut when using this property.

  • See Also:
    setDoughnutThickness(short), PointAttributes.setVolume(short), Chart.setGallery(int), Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType), SeriesAttributes, Chart

    http://www.softwarefx.com

    2005 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
    All other names are trademarks or registered trademarks of their respective owners.