CFXConditionalAttributes Class Reference

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

Overview

Once the class has been configured with the desired attributes, the object may be assigned to a chart's point, based on the configured conditions. The value of each point in the chart is evaluated based on the conditions of each ConditionalAttributes item. Points that meet the conditions of a particular conditional attribute item will retain the settings of that item. For more information regarding the configuration of the conditions, please see the CFXCondition class.

The conditional attributes must be defined before the CFXChart is populated.

In order to use this functionality you must include jchartfx.advanced.js in your project.

Properties

alternateColor

Gets or sets the alternate color for a selected item when using gradient FillMode.

@property(nonatomic) UIColor alternateColor
Discussion

This property is used in conjunction with fillMode property. You need to set the FillMode to gradient in order to use AlternateColor property.

To create a gradient for an item, you first need to set an initial color using the color property. Then you can assign a AlternateColor to complete the gradient assignment.

For more information regarding the Color type, please refer to the Xcode and Objective-C Documentation.

Declared In
ChartFX.h

barShape

Gets or sets the Shape for the Bars.

@property(nonatomic) CFXBarShape barShape
Discussion

This property applies when the chart Gallery is set to Bar.

Declared In
ChartFX.h

border

Provides access to the border attributes object.

@property(nonatomic) CFXBorderAttributes border
Discussion

The members of the BorderAttributes class allow customization of the border for CFXPoints and CFXSeries.

Color, Effect, Style, Width, etc, are some of the configurable attributes for Borders.

Declared In
ChartFX.h

color

Allows you to set a color for the selected item.

@property(nonatomic) UIColor color
Discussion

If no colors are specified, the default color is automatically selected by Chart FX for iOS when you create the chart, and chosen according to the current palette and its position in the series array.

For more information regarding the Color type, please refer to your Xcode and Objective-C documentation.

Availability
  • Available in iOS 5.0 and later.
Declared In
ChartFX.h

condition

Returns a Condition object for the specified ConditionalAttributes object.

@property(nonatomic) CFXCondition condition
Discussion

You may use this object to manipulate the conditions in which the ConditionalAttribute applies.

Declared In
ChartFX.h

fillMode

Gets or sets a value indicating how Chart FX for iOS should fill the area representing the point.

@property(nonatomic) CFXFillMode fillMode
Discussion

The default value is Solid.

The difference between colored patterns and black & white patterns, also known as hatched paterns, is that hatched patterns are defined by windows and they can be resized when printing the charts. However, there are limited hatched patterns available.

When creating gradients on point or series markers, the FillMode must be set to CFXFillModeGradient. The color and alternateColor properties can be set to create the desired gradient colors.

Declared In
ChartFX.h

line

Gets the LineAttributes object for the particular point.

@property(nonatomic) CFXLineAttributes line
Discussion

The CFXLineAttributes members allows customization of the lines at the CFXGlobalAttributes, CFXSeriesAttributes and CFXPointAttributes level.

LineAttributes will produce a different effect to each Gallery type.  For a example, setting the Line.Width in a Bar chart will set width the line that goes around the bar, while in a Line chart, it will set the width of the line that connects the points.

Declared In
ChartFX.h

markerShape

Gets or sets the the type used to paint markers for the selected item.

@property(nonatomic) CFXMarkerShape markerShape
Discussion

Point markers will not be shown in 3D line charts.

This property applies only to: LINES, CURVE, SCATTER, PARETO, STEP and RADAR charts.

Availability
  • Available in iOS 5.0 and later.
Declared In
ChartFX.h

markerSize

Gets or sets a value controlling the size of the markers for the selected item.

@property(nonatomic) short int markerSize
Discussion

This property sets the radius of the marker in physical units (pixels). You must make sure the markerShape Property is set to a valid point type for this property to take effect.

Point markers will not be shown in 3D line charts.

Availability
  • Available in iOS 5.0 and later.
Declared In
ChartFX.h

markerStyle

Gets or sets the the style used to paint markers for the selected item.

@property(nonatomic) CFXMarkerStyle markerStyle
Discussion

Point markers will not be shown in 3D line charts.

This property applies only to: LINES, CURVE, SCATTER, PARETO, STEP and RADAR charts.

Declared In
ChartFX.h

picture

Gets or sets a value specifying the picture associated to the selected item.

@property(nonatomic) UIImage picture
Discussion

The Picture property may be used in two different ways depending on the chart's gallery and FillMode:

1. If the chart gallery is one that uses point markers, meaning you can set the shape of the marker using the MarkerShape property, then the configured image will be used as a point marker as long as the markerShape for that point is set to MarkerShape.Picture.

2. If the chart gallery is one that uses bars, area markers or pie slices (Bar, Area or Pie type charts), then the image will be tiled in the selected series or point. However, in order for the tiled effect to be applied you must set the fillMode to FillMode.Pattern.

The Legends and DataEditor will also show the picture but with an appropriated size. Notice that if you do not set the fillMode to FillMode.Pattern, the configured picture will only be used with charts that have point markers.

When this property is set to a 3D chart, the sides of the markers (3D perspective) are painted with the configured series color.

For more information regarding the Image type, please refer to the Xcode and Objective-C Documentation.

Declared In
ChartFX.h

pointLabels

Provides access to PointLabelAttributes allowing for the manipulation of attributes pertaining to the point label.

@property(nonatomic) CFXPointLabelAttributes pointLabels
Discussion

The CFXPointAttributes members allows customization of the Point labels at the CFXGlobalAttributes, CFXSeriesAttributes and CFXPointAttributes level.

Declared In
ChartFX.h

separateSlice

Gets or sets a value allowing you to separate a slice of a Pie or Doughnut chart for a selected item.

@property(nonatomic) short int separateSlice
Discussion

Setting this property to 100 will make the vertex of the slice to be on the edge of the pie.

Chart FX for iOS does not provide administrative properties, such as the biggest slice in a PIE chart, so if you want to separate a particular slice based on a certain condition, you must first determine the slice to be separated based on the data contained in the chart.

Declared In
ChartFX.h

series

Gets or sets a value indicating which series index the ConditionalAttribute will be applied to.

@property(nonatomic) int series
Discussion

By default, ConditionalAttributes are applied to all series in the chart. To reset a ConditionalAttribute to be applied to all series, set the series property to -1.

The condition property is used to obtain the CFXCondition object for a selected ConditionalAttribute. Using this object you may configure the conditions for the ConditionalAttributes object.

Declared In
ChartFX.h

tag

Gets or sets and object for the specific item.

@property(nonatomic) NSObject tag
Discussion

The Tag allows the developer to assign and external object to a Point, Series, or the Chart itself, to be retrieved later.

This feature is very useful for drill-down. For example, a data collection which contains the all the data for a particular series can be stored in the Tag, and accessed later, when the user clicks on that series.

Declared In
ChartFX.h

text

Gets or sets a value for labeling the point or series attribute.

@property(nonatomic) NSString *text
Discussion

For Points, Text will be used to asign a string to the point, which can be used as a pointLabels, in a tooltip, etc.

For CFXSeriesAttibutes and CFXConditionalAttributes, Text will be used to asign a string for the legend.

Declared In
ChartFX.h

volume

Gets or sets a value indicating a volume for a data point markers in supported galleries. By adjusting the volume, you can modify the amount of space you want between the items.

@property(nonatomic) short int volume
Discussion

The larger the value, the lesser the distance between the selected point and its neighbors.

This property has a dual functionality depending on the clustered status of the chart, as follows:

If the chart is clustered, this property is used to specify the amount of space between the selected point and its neighbors in the z-axis (a.k.a. Gap Depth). When used in this context, this property is used for any chart type that supports clustered options (Including Multi-Type charts)

When the chart is not clustered, this property controls the amount of space between the selected point and its neighbors in the x-axis (a.k.a. Gap Width). When used in this context, this property applies to any chart type that allows side to side positioning of the series (BAR, BUBBLE, CANDLESTICK, HI-LO-CLOSE, OPEN-HI-LOW-CLOSE and CUBES).

If you want to control the Volume property for all the series in the chart (i.e. apply the same volume setting to all of them) you can use the chart class AllSeries property.

Declared In
ChartFX.h

Constants

CFXBarShape

Sets the shape for the bars in a Bar Chart

typedef enum {
   CFXRectangle,
   CFXCylinder,
   CFXCone,
   CFXPyramid
} CFXBarShape;
Constants
CFXRectangle
Sets the Bar shape to a Rectangle (Default).
CFXCylinder
Sets the Bar shape to a Cylinder.
CFXCone
Sets the Bar shape to a Cone.
CFXPyramid
Sets the Bar shape to a Pyramid.
Declared In
chartfx.h

CFXFillMode

Defines color scheme in the chart.

typedef enum {
   CFXSolid,
   CFXMonochrome,
   CFXPattern,
   CFXGradient
} CFXFillMode;
Constants
CFXSolid
Use solid colors.
CFXMonochrome
Use Black & White patterns.
CFXPattern
Use colored patterns.
CFXGradient
Use Gradient when painting the chart series
Declared In
chartfx.h

CFXMarkerShape

Defines different shapes used to paint point markers in the chart.

typedef enum {
   CFXNone,
   CFXRect,
   CFXCircle,
   CFXTriangle,
   CFXDiamond,
   CFXMarble,
   CFXHorizontalLine,
   CFXVerticalLine,
   CFXCross,
   CFXInvertedTriangle,
   CFXX,
   CFXMany,
   CFXPicture
} CFXMarkerShape;
Constants
CFXNone
Do not display point markers.
CFXRect
Displays a rectangle.
CFXCircle
Displays a circle.
CFXTriangle
Displays a triangle.
CFXDiamond
Displays a diamond.
CFXMarble
Displays a 3D marble.
CFXHorizontalLine
Displays a horizontal line.
CFXVerticalLine
Displays a vertical line.
CFXCross
Displays a cross.
CFXInvertedTriangle
Displays a rotated triangle.
CFXX
Displays an X.
CFXMany
Selects a combination of marker shapes.
CFXPicture
Displays a configured picture.
Declared In
chartfx.h

CFXMarkerStyle

Description goes here

typedef enum {
   CFXDefault,
   CFXAlternate
} CFXMarkerStyle;
Constants
CFXDefault
Description goes here
CFXAlternate
Description goes here
Declared In
chartfx.h