an issue with <cfchart value

Posted on 2014-12-30
Last Modified: 2015-01-12

I am getting an error that says this:

Attribute validation error for CFCHARTDATA. The value of the VALUE attribute is invalid. The value cannot be converted to a numeric because it is not a simple value.Simple values are booleans, numbers, strings, and date-time values. 
The error occurred on line 201.

Open in new window


         chartheight="800" chartwidth="950" >
	             serieslabel="Applications Type"
                 <CFIF isDefined("GetAppType") and #GetAppType.RecordCount# gt 0>
                <cfloop query="GetAppType">
                       <cfchartdata item="#GetAppType.ApplicationType#" 


Open in new window

The problem is with my  value="#GetAppType.Percentage#">        
the output of this


output is


If I take the percent sign out, then it will work but I want the percent sign in the value.

Thank you for your help
Question by:lulu50
  • 3
  • 2
LVL 39

Accepted Solution

gdemaria earned 500 total points
ID: 40524331
You can wrap val() around the value to use only  the numeric part of it.

As far as showing the % on the chart, you need to choose a chart style that is expecting a percent (that is, the percent is part of the chart format, not part of the value passed).

<cfchartdata item="#GetAppType.ApplicationType#"

Author Comment

ID: 40524456

I'm not getting the error anymore after adding the val() but for some reason I cannot see the % sign

can I do something like this

#val(GetAppType.Percentage)# + '%'">
LVL 39

Expert Comment

ID: 40524527
No unfortunately, that won't work.   The item tag is expecting a number.  

To get the percent sign to appear it is part of one of the parameters or the style.

I'm so sorry,  the family is waiting for me in the car, we are heading out of state for a couple days.  Sorry to leave you hanging, I don't recall which parameter it is, but it is some type of format or style that you have to apply, it is not in the number.  
Sorry !

Author Comment

ID: 40524694
have fun!!!

I'll wait for you because most likely I wont know how to fix it.

Author Closing Comment

ID: 40545073
Thank you

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now