Chart FX for Java 6.5

SoftwareFX.ChartFX
Class Pie

java.lang.Object
  extended by SoftwareFX.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()
          Gets the DoughnutThickness.
 int getExplodingMode()
          Gets the ExplodingMode.
 short getLineBreak()
          Gets the LineBreak.
 int getMinPercentage()
          Gets the MinPercentage.
 short getSliceSeparation()
          Gets the SliceSeparation.
 boolean isLabelsInside()
          Gets the LabelsInside.
 boolean isShadows()
          Gets the Shadows.
 boolean isShowLines()
          Gets the ShowLines.
 boolean isSquare()
          Gets the Square.
 boolean isStacked()
          Gets the Stacked.
 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()

Gets the DoughnutThickness. For more detail see setDoughnutThickness(short).


getExplodingMode

public int getExplodingMode()

Gets the ExplodingMode. For more detail see setExplodingMode(int).


getLineBreak

public short getLineBreak()

Gets the LineBreak. For more detail see setLineBreak(short).


getMinPercentage

public int getMinPercentage()

Gets the MinPercentage. For more detail see setMinPercentage(int).


getSliceSeparation

public short getSliceSeparation()

Gets the SliceSeparation. For more detail see setSliceSeparation(short).


isLabelsInside

public boolean isLabelsInside()

Gets the LabelsInside. For more detail see setLabelsInside(boolean).


isShadows

public boolean isShadows()

Gets the Shadows. For more detail see setShadows(boolean).


isShowLines

public boolean isShowLines()

Gets the ShowLines. For more detail see setShowLines(boolean).


isSquare

public boolean isSquare()

Gets the Square. For more detail see setSquare(boolean).


isStacked

public boolean isStacked()

Gets the Stacked. For more detail see setStacked(boolean).


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 ChartCore.setGallery(int) is not set to pie/doughnut when using this property.

  • See Also:
    ChartCore.setGallery(int), ChartCore.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
    ExplodingMode.NONEPie slices are not separated.
    ExplodingMode.ALLAll pie slices are separated.
    ExplodingMode.FIRSTOnly first pie slice is separated.
    ExplodingMode.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 ChartCore.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), ChartCore.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 ChartCore.setGallery(int) is not set to Pie/Doughnut when using this property.ChartCore.setGallery(int)

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

  • See Also:
    ChartCore.setGallery(int), ChartCore.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), ChartCore.setGallery(int), ChartCore.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 ChartCore.setGallery(int) is not set to Pie/Doughnut when using this property.ChartCore.setGallery(int)

  • See Also:
    ChartCore.setGallery(int), ChartCore.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 ChartCore.setGallery(int) is not set to Pie/Doughnut when using this property.ChartCore.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.ChartCore.setGallery(int)

  • See Also:
    ChartCore.setGallery(int), ChartCore.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 ChartCore.setGallery(int) selected must be the same as the type of gallery object created using the ChartCore.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:
    ChartCore.setGallery(int), ChartCore.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 ChartCore.setGallery(int) is not set to Pie/Doughnut when using this property.ChartCore.setGallery(int)

  • See Also:
    setExplodingMode(int), setLabelsInside(boolean), setMinPercentage(int), setShadows(boolean), setShowLines(boolean), setSquare(boolean), ChartCore.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 ChartCore.setGallery(int) is not set to Pie/Doughnut when using this property.ChartCore.setGallery(int)

  • See Also:
    ChartCore.setGallery(int), ChartCore.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 ChartCore.setGallery(int) object is created:

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

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

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

    http://www.softwarefx.com

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