cfgraphdata

Description

Specifies a data point to be displayed by a cfgraph tag.

Category

Extensibility tags

Syntax


<cfgraphdata item = "data item"

  value = data value

  item = "label string"

  color = "Web color"

  URL = "URL string"> 

See also

cfgraph, cfcollection, cfexecute, cfindex, cfobject, cfreport, cfsearch, cfservlet, cfwddx

Attributes

Attribute
Description
value
Required. Value to be represented by the data point.
item
Optional. The item label for the data point. The item labels appear on the horizontal axis of Line and Bar charts, the vertical axis of Horizontal Bar charts, and in the legend of Pie charts.
color
Optional. The color to use when graphing the data point. The default is to use the values from the cfgraph tag colorlist attribute or the built-in default list of colors. Line graphs ignore this attribute.
URL
Optional. A URL to load when the user clicks the data point. This attribute works with Pie, Bar, and HorizontalBar charts. This attribute has an effect only if the graph is in Flash file format.

Usage

The cfgraph tag enables you to graph data that is not from a query. You can use hard-coded data, variables, and other dynamically generated data. You can combine these data points with query data in a graph by including cfgraphdata tags in a cfgraph tag that specifies a query.

Example

This example sets the income values of four departments. A bar chart uses cfgraphdata tags to specify the data points to chart.

<cfset NewIncome = 1200000>

<cfset UsedIncom = 870000>

<cfset Leasingincome = 930000>

<cfset ServiceIncome = 760000>



<cfgraph type = "bar" title = "Income by Department">

  <cfgraphdata label = "New Vehicle Sales" value = NewIncome>

  <cfgraphdata label = "Used Vehicle Sales" value = UsedIncome>

  <cfgraphdata label = "Leasing" value = LeasingIncome>

  <cfgraphdata label = "Service" value = ServiceIncome>

</cfgraph>





Banner.Novgorod.Ru