<cfchartdata>

Used with the cfchart and cfchartseries tags. This tag defines chart data points. Its data is submitted to the cfchartseries tag.

This tag cannot have a body.

This tag is also supported within <cfscript>

Attribute Description
item
string, required

string; data point name

value
number, required

number or expression; data point value

<cfchartdata
    item=string
    value=number
>

Examples

Simple example for Chartdata

<cfchart format="jpg" title="Sales Result" backgroundcolor="yellow" showborder="true">
  <cfchartseries type="curve">
    <cfchartdata item="2016" value="#RandRange(100,500)#">
    <cfchartdata item="2017" value="#RandRange(100,500)#">
    <cfchartdata item="2018" value="#RandRange(100,500)#">
    <cfchartdata item="2019" value="#RandRange(100,500)#">
  </cfchartseries>
</cfchart>

See also