Ritu
Ritu

Reputation: 1095

Error while using Cfchart

I am cfchart for creating chart in ColdFusion. I used the following code. I use the value of variable in chartdata I am getting error

"Invalid token c found on line 204 at column 34" i.e. cfchartdata item="0 - 6 Months" value="#count_06#"

Code:

<cfchart   
            format="jpg"  
            xaxistitle="Body Part"  
            yaxistitle="Claims"  
            chartheight="500" 
            chartwidth="1000"  
            showlegend = "yes"
            show3d="yes"
            backgroundcolor="##006600"
            foregroundcolor="FFFFFF"  
        >  
            <cfchartseries     
                type="bar" 
                seriescolor="##006600"
                seriesLabel="Claims Number"
                <cfchartdata item="0 - 6 Months" value="#count_06#"/>  
                <cfchartdata item="6 Months - 1 Year" value="#count_61#"/>  
                <cfchartdata item="Over 10 years" value="#count_10#"/>  
            >  
            </cfchartseries>  

        </cfchart>

Upvotes: 0

Views: 263

Answers (1)

baynezy
baynezy

Reputation: 7036

It is because you haven't closed the openning cfchartseries tag

So do this

seriesLabel="Claims Number">

instead of this:-

seriesLabel="Claims Number"

Upvotes: 3

Related Questions