|
Chart FX 7 for Java Server | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwarefx.chartfx.server.Attributes3D
public class Attributes3D
Provides access to the Attributes3D object.
The Attributes3D class supported members allow developers to add 3D views and perspective to charts. By enabling 3D in charts, developers may further customize the display by manipulating X and Y angles, depth, perspective, rotation and shadowing. Additionally, members like Cluster allow you to add a Z dimension to charts.
Constructor Summary | |
---|---|
Attributes3D()
|
Method Summary | |
---|---|
int |
getAngleX()
Gets the AngleX. |
int |
getAngleY()
Gets the AngleY. |
int |
getBoxThickness()
Gets the BoxThickness. |
int |
getDepth()
Gets the Depth. |
int |
getPerspective()
Gets the Perspective. |
Shadow |
getShadow()
Gets the Shadow. |
boolean |
isCluster()
Gets the Cluster. |
boolean |
isEnabled()
Gets the Enabled. |
boolean |
isRotated()
Gets the Rotated. |
void |
setAngleX(int value)
Sets the 3D rotation angle around the X-axis. |
void |
setAngleY(int value)
Sets a 3D rotation angle around the Y-axis. |
void |
setBoxThickness(int value)
Sets the thickness for the box surrounding the chart. |
void |
setCluster(boolean value)
Displays a z-clustered 3D chart. |
void |
setDepth(int value)
Sets the thickness along the Z-axis for the series. |
void |
setEnabled(boolean value)
Sets a value indicating whether 3D effects should be applied. |
void |
setPerspective(int value)
Allows you to set a 3D perspective to control the view of the chart depth. |
void |
setRotated(boolean value)
Sets a value indicating the chart is Rotated. |
void |
setShadow(Shadow value)
Sets a value indicating the type of shading to display when rotating the chart. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Attributes3D()
Method Detail |
---|
public int getAngleX()
Gets the AngleX. For more detail see setAngleX(int)
.
public int getAngleY()
Gets the AngleY. For more detail see setAngleY(int)
.
public int getBoxThickness()
Gets the BoxThickness. For more detail see setBoxThickness(int)
.
public int getDepth()
Gets the Depth. For more detail see setDepth(int)
.
public int getPerspective()
Gets the Perspective. For more detail see setPerspective(int)
.
public Shadow getShadow()
Gets the Shadow. For more detail see setShadow(com.softwarefx.chartfx.server.Shadow)
.
public boolean isCluster()
Gets the Cluster. For more detail see setCluster(boolean)
.
public boolean isEnabled()
Gets the Enabled. For more detail see setEnabled(boolean)
.
public boolean isRotated()
Gets the Rotated. For more detail see setRotated(boolean)
.
public void setAngleX(int value)
Sets the 3D rotation angle around the X-axis.
The value can be set to an integer between [0-90] or [270-360] indicating the degree of rotation around the X-axis.
Negative values or values greater than 360 are automatically reduced to a value in the range of 0 to 359.
This property can only be used when the chart is in 3D view. So, be sure the setEnabled(boolean)
property is set to True.
To avoid jagged lines we recommend you use prominent angles (for example: 0,30,45,60,90, etc).
To set a Y-axis rotation angle, please refer to the setAngleY(int)
property.
setAngleY(int)
,
Chart.getView3D()
,
Chart
public void setAngleY(int value)
Sets a 3D rotation angle around the Y-axis.
The value can be set to an integer between [0-90] or [270-360] indicating the degree of rotation around the Y-axis.
Negative values or values greater than 360 are automatically reduced to a value in the range of 0 to 359.
This property can only be used when the chart is in 3D view. So, be sure the setEnabled(boolean)
property is set to True.
To avoid jagged lines we recommend you use prominent angles (for example: 0,30,45,60,90, etc).
To set an X-axis rotation angle, please refer to the setAngleX(int)
property.
setAngleX(int)
,
Chart.getView3D()
public void setBoxThickness(int value)
Sets the thickness for the box surrounding the chart.
Here is a chart with a BoxThickness of 10.
setAngleX(int)
,
setAngleY(int)
,
setDepth(int)
,
setPerspective(int)
,
Chart.getView3D()
,
Chart
public void setCluster(boolean value)
Displays a z-clustered 3D chart.
When set to True, the chart will show as clustered; when set to False, the chart displays the series side-by-side.
When setting this property, you must make sure that the chart is displayed in 3D mode (by setting the setEnabled(boolean)
property to true) and that the chart is cluster capable (BAR, LINES or GANTT chart).
When displaying a clustered chart, each series will have its own position in the Z axis. This means, if this property is set to true, then each data series will occupy one row of data along the Z-axis
AREA charts are always clustered as there is no way to paint different series side by side. On the other hand, if you have a BAR chart, it is possible to paint bars side-by-side and not clustered in the z-axis.
Below is an example of a non-clustered bar chart vs. a clustered bar chart.
Non-Clustered:
Clustered:
Chart.getView3D()
,
Chart
public void setDepth(int value)
Sets the thickness along the Z-axis for the series.
Here are two examples demonstrating the differences when using a Depth of 0 and a Depth of 150.
Depth value of 0:
Depth value of 150:
setBoxThickness(int)
,
Chart.getView3D()
,
Chart
public void setEnabled(boolean value)
Sets a value indicating whether 3D effects should be applied.
Toggles the chart between 2D and 3D modes. When set to True the chart is displayed in 3D.
Chart.getView3D()
,
Chart
public void setPerspective(int value)
Allows you to set a 3D perspective to control the view of the chart depth.
The perspective value specifies the ratio of the front of the chart to the back of the chart. It ranges from 0 (default) degrees to 100 degrees.
In order to apply a perspective, the chart setEnabled(boolean)
must be set to True.
To see the difference, below is a chart with the perspective set to 0 (the default) and the same chart set with a perspective of 50.
A perspective value of 0 (default):
A perspective value of 50:
Chart.getView3D()
,
Chart
public void setRotated(boolean value)
Sets a value indicating the chart is Rotated.
Allows you to enable or disable a Rotated view in a 3D chart.
When a chart is Rotated, angles and perspective attributes are also applied.
setAngleX(int)
,
setAngleY(int)
,
setPerspective(int)
,
Chart.getView3D()
,
Chart
public void setShadow(Shadow value)
Sets a value indicating the type of shading to display when rotating the chart.
Chart.getView3D()
,
Chart
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |