Specifies a data point to be displayed by a cfgraph
tag.
<cfgraphdata item = "data item" value = data value item = "label string" color = "Web color" URL = "URL string">
cfgraph,
cfcollection,
cfexecute,
cfindex,
cfobject,
cfreport,
cfsearch,
cfservlet,
cfwddx
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.
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>