|
Chart FX for Java 6.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSoftwareFX.ChartFX.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()
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 |
public Pie()
Method Detail |
public short getDoughnutThickness()
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 Chart.setGallery(int)
is not set to pie/doughnut when using this property.
Chart.setGallery(int)
,
Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
setStacked(boolean)
,
Chart
public int getExplodingMode()
Allows you to set how the slices of a pie chart are displayed.
ExplodingMode :
Pie exploding mode.Value | Description |
NONE | Pie slices are not separated. |
ALL | All pie slices are separated. |
FIRST | Only first pie slice is separated. |
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 Chart.setGallery(int)
is not set to Pie/Doughnut when using this property.
setLabelsInside(boolean)
,
setMinPercentage(int)
,
setShadows(boolean)
,
setShowLines(boolean)
,
setSliceSeparation(short)
,
setSquare(boolean)
,
Chart.setGallery(int)
,
Chart
public short getLineBreak()
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)
,
Chart.setGallery(int)
,
Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
Chart
,
SeriesAttributes
public int getMinPercentage()
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 Chart.setGallery(int)
is not set to Pie/Doughnut when using this property.Chart.setGallery(int)
Chart.setGallery(int)
,
Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
setLabelsInside(boolean)
,
setShadows(boolean)
,
setSquare(boolean)
,
Chart
public short getSliceSeparation()
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 Chart.setGallery(int)
is not set to Pie/Doughnut when using this property.Chart.setGallery(int)
setExplodingMode(int)
,
setLabelsInside(boolean)
,
setMinPercentage(int)
,
setShadows(boolean)
,
setShowLines(boolean)
,
setSquare(boolean)
,
Chart.setGallery(int)
,
Chart
public boolean isLabelsInside()
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 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.
Chart.setGallery(int)
,
Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
setMinPercentage(int)
,
setShadows(boolean)
,
setSquare(boolean)
,
Chart
public boolean isShadows()
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 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)
Chart.setGallery(int)
,
Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
setLabelsInside(boolean)
,
setMinPercentage(int)
,
setSquare(boolean)
,
Chart
public boolean isShowLines()
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 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.
Chart.setGallery(int)
,
Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
Chart
public boolean isSquare()
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 Chart.setGallery(int)
is not set to Pie/Doughnut when using this property.Chart.setGallery(int)
Chart.setGallery(int)
,
Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
setLabelsInside(boolean)
,
setMinPercentage(int)
,
setShadows(boolean)
,
Chart
public boolean isStacked()
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 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.
setDoughnutThickness(short)
,
PointAttributes.setVolume(short)
,
Chart.setGallery(int)
,
Chart.setGalleryObj(SoftwareFX.ChartFX.IGalleryType)
,
SeriesAttributes
,
Chart
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 Chart.setGallery(int)
is not set to pie/doughnut when using this property.
Chart.setGallery(int)
,
Chart.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 |
NONE | Pie slices are not separated. |
ALL | All pie slices are separated. |
FIRST | Only first pie slice is separated. |
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 Chart.setGallery(int)
is not set to Pie/Doughnut when using this property.
setLabelsInside(boolean)
,
setMinPercentage(int)
,
setShadows(boolean)
,
setShowLines(boolean)
,
setSliceSeparation(short)
,
setSquare(boolean)
,
Chart.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 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.
Chart.setGallery(int)
,
Chart.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)
,
Chart.setGallery(int)
,
Chart.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 Chart.setGallery(int)
is not set to Pie/Doughnut when using this property.Chart.setGallery(int)
Chart.setGallery(int)
,
Chart.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 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)
Chart.setGallery(int)
,
Chart.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 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.
Chart.setGallery(int)
,
Chart.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 Chart.setGallery(int)
is not set to Pie/Doughnut when using this property.Chart.setGallery(int)
setExplodingMode(int)
,
setLabelsInside(boolean)
,
setMinPercentage(int)
,
setShadows(boolean)
,
setShowLines(boolean)
,
setSquare(boolean)
,
Chart.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 Chart.setGallery(int)
is not set to Pie/Doughnut when using this property.Chart.setGallery(int)
Chart.setGallery(int)
,
Chart.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 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.
setDoughnutThickness(short)
,
PointAttributes.setVolume(short)
,
Chart.setGallery(int)
,
Chart.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 |