Just loop over the array

<cfloop index="i" from="1" to="#arrayLen(arrayPerson)#">
        <cfchartdata item="#arrayPerson[i]#" value="#salesArray[i]#">
</cfloop>


Regards
Dale Fraser

http://learncf.com

-----Original Message-----
From: Peter Tanswell [mailto:[EMAIL PROTECTED] 
Sent: Monday, 15 October 2007 9:49 AM
To: CF-Talk
Subject: using array data to create a cfchart

Hi there

I have created two arrays which contain the data that I want to report on
using cfchart.

Basically I have a person name array and a person sales array.  I am trying
to work out how I can use the data in the arrays to produce the cfchart.

Currently I have hard coded the information into the cfchart below, but this
is limiting as this report will run for various retail stores and I dont
know the sles people from each store.

<cfchart
       chartwidth="950"
        chartheight="500"
        xaxistitle="Sales Staff"
        yaxistitle="Revenue"
        show3d="Yes">
 <cfchartseries
     type="pie"
     serieslabel="Sales Staff"
     seriescolor="##ffcc00">
  <cfchartdata item="Alan Ash" value="2387 ">
  <cfchartdata item="Brad Bloom" value="7795">
  <cfchartdata item="Colin Craig" value="2487">
  <cfchartdata item=" Doug Douglas" value="511">
  <cfchartdata item="Ed Edwards" value="1565">
  <cfchartdata item="Frank Farina" value="781">
 </cfchartseries>
</cfchart>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291058
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to