Contents > Developing ColdFusion MX Applications > Charting and Graphing Data > Controlling chart appearance > Common chart characteristics PreviousNext

Common chart characteristics

You can optionally specify the following characteristics to cfchart on all types of charts:

Chart characteristic


Attributes used


Description

File type

format

Whether to send the chart to the user as a JPG, PNG, or Flash Movie (.swf) file. Flash is the default format.

Dimensions

chartWidth
chartHeight

The width and height, in pixels, of the chart. This size defines the entire chart area, including the legend and background area around the chart.

The default height is 240 pixels; the default width is 320 pixels.

Foreground and background color

foregroundColor
dataBackgroundColor
backgroundColor

The colors used for foreground and background objects.

The default foreground color is black; the default background colors are white.

You can specify 16 color names or use any valid HTML color format. If you use the numeric format, you must use double pound signs, for example, blue or ##FF33CC. For the complete list of colors, see Configuring and Administering ColdFusion MX.

Border

showBorder

Specifies to draw a border around the chart. The border color is the same as specified by the foregroundColor attribute. Default is no.

Labels

font
fontSize
fontBold
frontItalic
labelFormat
xAxisTitle
yAxisTitle

font specifies the font for all text. Default is Arial. If you are using a double-byte character set on UNIX, or using a double-byte character set on Windows with a file type of Flash, you must specify ArialUnicodeMs as the font.

fontSize specifies an Integer font size used for all text. Default is 11.

fontBold specifies to display all text as bold. Default is no.

fontItalic specifies to display all text as italic. Default is no.

labelFormat specifies the format of the y-axis labels, number, currency, percent, or date. Default is number.

xAxisTitle and yAxisTitle specify the title for each axis.

3D Appearance

show3D
xOffset
yOffset

show3D displays the chart in 3D. Default is no.

xOffset and yOffset specify the amount to which the chart should be rotated on a horizontal axis (xOffset) or vertical axis (yOffset). 0 is flat (no rotation), -1 and 1 are for a full 90 degree rotation left
(-1) or right (1). Default is .1

Rotation

rotated

Rotates the entire chart 90 degrees. Set to yes to create a horizontal chart, such as a horizontal bar chart. Default is no.

Multiple series

showLegend
seriesPlacement

showLegend specifies to display the chart's legend when the chart contains more than one series of data. Default is yes.

seriesPlacement specifies the location of each series relative to the others. By default, ColdFusion determines the best placement based on the graph type of each series.

Tips

tipStyle
tipBGColor

tipStyle specifies to display a small popup window that shows information about the chart element pointed to by the curser. Options are none, mousedown, or mouseover. Default is mouseover.

tipBGColor specifies the background color of the tip window for Flash format only. Default is white.

Markers

showMarkers
markerSize

showMarkers specifies to show markers at the data points for 2D line, curve, and scatter charts. Default is yes.

markerSize specifies an integer number of pixels for the marker size. ColdFusion determines default.

You can also use the cfchartseries tag to specify attributes of chart appearance. The following table describes these attributes:

Chart
characteristic


Attributes used


Description

Multiple series

seriesLabel
seriesColor

seriesLabel specifies the text displayed for the series label.

seriesColor specifies a single color of the bar, line, pyramid, and so on. For pie charts, this is the first slice's color. Subsequent slices are automatically colored based on the specified initial color, or use the colorList attribute.

Paint

paintStyle

Specifies the way color is applied to a data series. You can specify solid color, buttonized look, linear gradient fill with a light center and darker outer edge, and gradient fill on lighter version of color. Default is solid.

Data markers

markerStyle

For line, curve, and scatter charts, specifies the shape used to mark the data point. Supported for 2-dimensional charts. Default is rectangle.


Contents > Developing ColdFusion MX Applications > Charting and Graphing Data > Controlling chart appearance > Common chart characteristics PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.