cfchart multiple colorlist

I'm trying to create a bar chart with different colored bars for different values.  I have that working using a colorlist.  However, I have a second chartseries that creates a line on the same chart that I would like to be a different color and lie on top of the bar chart.  The first colorlist is applying itself to the second data series.  If I create a new colorlist for the second chartseries it changes the first chartseries. I have also tried using seriesColor but the color list overwrites it. Are ther any work arounds for what appears to be a bug?  I am running CF11.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I think we need to see the code (or at least I do).  I haven't experienced this issue and it may be just how it's being done
muellertjAuthor Commented:
<cfset cList = "">
<cfloop query="thisChart">
<cfif #ht# GT #optmax#>
<cfset cList = listAppend(cList, "##FF0000")>
<cfelseif #ht# lte #optmax# and #ht# gte #optmin#>
<cfset cList = listAppend(cList, "##008000")>
<cfset cList = listAppend(cList, "##FFFF00")>

<cfchart chartheight="#ch#" chartwidth="#cw#" format="html" xaxistitle="Paddock" yaxistitle="#unit#" showlegend="no" seriesplacement="default" showmarkers="no">


       seriesColor= "##000000">

According to CF documentation, colorList is not applicable to bar..

Sets colors for each data point.  Applies if the cfchartseriestype attribute is pie, pyramid, area, horizontalbar, cone, cylinder, or step.

I have always used seriesColor and specified it for each series...

 <cfset variables.colorList = " ....">   <!---- your color list --->

   <cfoutput query="myQuery" group="productCategory">
	  <cfset variables.thisColor = listFirst(variables.colorList)>  <!--- get color for this series ---->
	  <cfset variables.colorList = listRest(variables.colorList)>   <!--- remove color from the list --->

		        <cfchartdata item="#theYear#" value="#numberFormat(myQuery.productValue,'99.99')#">
           </cfoutput> <!--- end loop each year ---->


Open in new window

CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

muellertjAuthor Commented:
The problem I have is that I want different colors for different values in the series.  In CF9 I had each color in a different series and when I stacked them they would show left to right, red then green then yellow with a blue line running across them all.  In CF11 when I stack them they go on top of the first series.  If I don't stack them then each additional series goes in next to the corresponding item from the first series even thought the x-axis variable is different.  So it might go red, green, yellow, red, green, yellow etc. when I want it to go red, red, green, green, yellow, yellow.  Any suggestions?
Not entirely sure what you are saying by stacking, etc.  But if you want to assign a specific color to a specific line/bar, the method I showed is good for that with a couple small changes.   Instead of just popping the next color off the list, you would assign the color based on whatever criteria using CFIF statement or switch statement or a structure.   Given that you are looping your series instead of allowing the cfseries tag to do it for you, you can also change your order; if that would help.
muellertjAuthor Commented:
I found this code which seems to be doing what I need.
<cfset plot = {
      "rules": [
      {"rule":"'%v'< #optmin#",

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gurpreet Singh RandhawaCEOCommented:
are you open to some different cfchart options or want to use the inbuild cfchart of coldfusion,

I found chartDirector very good custom based tag which actually runs on top of java and create very nice cfchart tags, there you can find the color combinations to add multiple lines of multiple colors i all the samples they have,

You can use the unregistered version which is good as it shows a label at the bottom as unregistered for any commercial site, license is just 99 usd

so try it, if that solves our issue

muellertjAuthor Commented:
I may have to look into chart director, but I have learned enough json code that I have my charts formated as I would like..
muellertjAuthor Commented:
I found my own solution.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.