Sign in to follow this  
Matrix

Dynamic outputing of series chart from DB

Recommended Posts

Hello,

We recently purchased the pro version of Fusion Charts and i am struggling with the Multiseries concept when pulling data from a database.

I have looked at the examples and i understand how they work, the problem i have is applying this.

We use Coldfusion 8 for our applications

I have a query which pulls out the following data:

  Q2.PRODUCT_TYPE_UUID,

  Q2.PRODUCT_TYPE_NAME,

  Q2.FTBR_WEEK_NO,

  Q2.QUALITY_RATE

I am struggling right here at the start, initialising the strings as the variable names have to be dynamic.

How do i get from this:

 <!--- Initialize the strings --->

 <cfset strCat = "<categories>">

 <cfset strAmtDS = "<dataset seriesName='Electric'>">

 <cfset strQtyDS = "<dataset seriesName='Mixer'>">

to something like this:

 <!--- Initialize the strings --->

 <cfset strCat = "<categories>">

<cfoutput query="Q2">

 <cfset "str#PRODUCT_TYPE_ID#" = "<dataset seriesName='#Q2.PRODUCT_TYPE_NAME#'>">

</cfoutput>

there is more to come but just want to go through section by section.

Thanks

Matt

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this