|
Chart FX for Java 6.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SoftwareFX.ChartFX.Pie
public final class Pie
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 |
---|
public Pie()
Method Detail |
---|
public short getDoughnutThickness()
Gets the DoughnutThickness. For more detail see setDoughnutThickness(short)
.
public int getExplodingMode()
Gets the ExplodingMode. For more detail see setExplodingMode(int)
.
public short getLineBreak()
Gets the LineBreak. For more detail see setLineBreak(short)
.
public int getMinPercentage()
Gets the MinPercentage. For more detail see setMinPercentage(int)
.
public short getSliceSeparation()
Gets the SliceSeparation. For more detail see setSliceSeparation(short)
.
public boolean isLabelsInside()
Gets the LabelsInside. For more detail see setLabelsInside(boolean)
.
public boolean isShadows()
Gets the Shadows. For more detail see setShadows(boolean)
.
public boolean isShowLines()
Gets the ShowLines. For more detail see setShowLines(boolean)
.
public boolean isSquare()
Gets the Square. For more detail see setSquare(boolean)
.
public boolean isStacked()
Gets the Stacked. For more detail see setStacked(boolean)
.
public void setDoughnutThickness(short value)
Controls the thickness of the doughnut as a percentage of the outside radius.
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.
ChartCore.setGallery(int)
,
ChartCore.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
setStacked(boolean)
,
Chart
public void setExplodingMode(int value)
Allows you to set how the slices of a pie chart are displayed.
ExplodingMode :
Pie exploding mode.Value | Description |
---|---|
ExplodingMode.NONE | Pie slices are not separated. |
ExplodingMode.ALL | All pie slices are separated. |
ExplodingMode.FIRST | Only first pie slice is separated. |
ExplodingMode.LAST | Only last pie slice is separated. |
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.
setLabelsInside(boolean)
,
setMinPercentage(int)
,
setShadows(boolean)
,
setShowLines(boolean)
,
setSliceSeparation(short)
,
setSquare(boolean)
,
ChartCore.setGallery(int)
,
Chart
public void setLabelsInside(boolean value)
Used to paint the point labels directly on the corresponding slice of a Pie chart.
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.
ChartCore.setGallery(int)
,
ChartCore.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
setMinPercentage(int)
,
setShadows(boolean)
,
setSquare(boolean)
,
Chart
public void setLineBreak(short value)
Controls the distance between the series in a stacked pie/doughnut chart.
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.
setDoughnutThickness(short)
,
setStacked(boolean)
,
ChartCore.setGallery(int)
,
ChartCore.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
Chart
,
SeriesAttributes
public void setMinPercentage(int value)
Specifies the minimum percentage the chart will reduce itself to accomodate label size when PointLabels is turned on.
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)
ChartCore.setGallery(int)
,
ChartCore.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
setLabelsInside(boolean)
,
setShadows(boolean)
,
setSquare(boolean)
,
Chart
public void setShadows(boolean value)
Adds a shadow effect to a 2D pie chart.
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)
ChartCore.setGallery(int)
,
ChartCore.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
setLabelsInside(boolean)
,
setMinPercentage(int)
,
setSquare(boolean)
,
Chart
public void setShowLines(boolean value)
Used to show or hide lines in a Pie chart.
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.
ChartCore.setGallery(int)
,
ChartCore.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
Chart
public void setSliceSeparation(short value)
Used to set the pie slice separation when using the ExplodingMode property.
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)
setExplodingMode(int)
,
setLabelsInside(boolean)
,
setMinPercentage(int)
,
setShadows(boolean)
,
setShowLines(boolean)
,
setSquare(boolean)
,
ChartCore.setGallery(int)
,
Chart
public void setSquare(boolean value)
Forces pie charts to be contained in a perfect square (no matter the window proportion).
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)
ChartCore.setGallery(int)
,
ChartCore.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
setLabelsInside(boolean)
,
setMinPercentage(int)
,
setShadows(boolean)
,
Chart
public void setStacked(boolean value)
Gets or sets a Boolean value specifying whether or not to stack a pie/doughnut chart.
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.
setDoughnutThickness(short)
,
PointAttributes.setVolume(short)
,
ChartCore.setGallery(int)
,
ChartCore.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
SeriesAttributes
,
Chart
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |