The Chart class is the proxy for the ColdFusion Chart service, which provides the functionality of the cfchart tag and its child chartdata and chartseries tags.

  • You specify the cfchart attributes as Chart object properties.
  • You represent chart series in the chartSeries element of the chart object. The chartSeries element is an arrays of objects, each of which represents a single chart (chartseries tag) document section. These objects include a type element for the chart type, a chartdata element for the chart data, and elements for any other series attributes.
  • You represent each chart's data as an array of objects, each of which contains an item element and a value element. You use these arrays as the chartdata elements of the chartSeries object.
  • You call the document object execute() function to run the service.
    The following example shows how you can use the chart service:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx=""
layout="absolute" xmlns:cf="coldfusion.service.mxml.*" creationComplete="init()">
import mx.controls.Alert;

public var chaSer:Array;
public var chaDat:Array;
function init():void
chaDat =
chaSer = [{type:"bar",chartdata:chaDat},
function handleResult(event:ResultEvent):void
{"success" + event.result.toString());
function handleFault(event:FaultEvent):void
{"failure" + event.toString());
<cf:Config id="configid" cfServer="localhost"
cfPort="80" servicePassword="service"
serviceUserName="service" >
<cf:Chart id="chartest"
yAxisTitle="Salary Average"
backgroundColor = "Black"
chartHeight = "500"
chartWidth = "600"
dataBackgroundColor = "yellow"
font = "ariel"
fontBold = "yes"
fontItalic = "yes"
fontSize = "12"
foregroundColor = "red"
gridLines = "2"
labelFormat = "number"
markerSize = "10"
showBorder = "yes"
showLegend = "yes"
showMarkers = "yes"
tipStyle = "MouseOver"
title = "AIR Integration testing"/>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy