CFXAttributes3D Class Reference

Inherits from
Conforms to
Framework
Availability
Available in iOS 5.0 and later.
Companion guide
Declared in
ChartFX.h

Overview

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.

Properties

angleX

Gets or sets the 3D rotation angle around the X-axis.

@property(nonatomic) int angleX
Discussion

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 enabled 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 angleY property.

Declared In
ChartFX.h

angleY

Gets or sets a 3D rotation angle around the Y-axis.

@property(nonatomic) int angleY
Discussion

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 enabled 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 angleX property.

Declared In
ChartFX.h

boxThickness

Gets or sets the thickness for the box surrounding the chart.

@property(nonatomic) int boxThickness
Declared In
ChartFX.h

cluster

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.

@property(nonatomic) BOOL cluster
Discussion

When setting this property, you must make sure that the chart is displayed in 3D mode (by setting the enabled 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.

Declared In
ChartFX.h

depth

Gets or sets the thickness along the Z-axis for the series.

@property(nonatomic) int depth
Declared In
ChartFX.h

enabled

Gets or sets a value indicating whether 3D effects should be applied.

@property(nonatomic) BOOL enabled
Discussion

Toggles the chart between 2D and 3D modes. When set to True the chart is displayed in 3D.

Declared In
ChartFX.h

perspective

Allows you to set a 3D perspective to control the view of the chart depth.

@property(nonatomic) int perspective
Discussion

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 enabled must be set to True.

Declared In
ChartFX.h

rotated

Gets or sets a value indicating the chart is Rotated.

@property(nonatomic) BOOL rotated
Discussion

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.

Declared In
ChartFX.h

shadow

Gets or sets a value indicating the type of shading to display when rotating the chart.

@property(nonatomic) CFXShadow shadow
Discussion

There are two property values available for shading:

Fixed (default):

Sets the standard shading for crevasses exposed in 3D charts such as the boxes surrounding the bar chart.

None:

Removes all shading features. Note, this may reduce the 3D effect of the chart.

Declared In
ChartFX.h

Constants

CFXShadow

Define light setting for a 3D chart.

typedef enum {
   CFXNone,
   CFXFixed
} CFXShadow;
Constants
CFXNone
Removes all shading features. Note, this may reduce the 3D effect of the chart.
CFXFixed
Sets the standard shading for crevasses exposed in 3D charts.
Declared In
chartfx.h