Also,

Not sure if you can control that array but if I was doing that id do it as
an array of structs or even a query.

Ie

<cfset person = arrayNew(1) />

<cfset person[1].name = "Dale Fraser" />
<cfset person[1].salary = "10000" />

Etc.

Regards
Dale Fraser

http://learncf.com


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

Thanks - worked like a charm

T


On 10/15/07, Dale Fraser <[EMAIL PROTECTED]> wrote:
>
> 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>
>
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

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

Reply via email to