ColdFusion (9) CFCHART Shaded Backgrounds?

Discussion in 'Programming' started by 137th Gebirg, Mar 14, 2016.

  1. #1
    Hello - been looking everywhere for a potential solution to this problem. I believe I'm close, but I am getting a weird error that doesn't make sense.

    I'm looking for a way to change the color of a y-axis range on a bar chart, behind the bars, to show actionable thresholds on trainee progress. I ran across this example that looks like it might provide the desired results:

    
    <cfsavecontent variable=“style”>
      <?xml version=“1.0” encoding=“UTF-8”?>
      <frameChart isInterpolated=“false” is3d=“false”>
        <yAxis>
          <limits index=“0” min=“120” max=“140” color=“##e6e7e8” />
        </yAxis>
      </frameChart>
    </cfsavecontent>
    <p />
    <cfchart chartWidth=“400” chartHeight=“400” title=“Title” style=“#style#”>
    
    Code (markup):
    Problem is, when I use this code, I get the error "Elements LIMITS must contain index attribute". And yet, the "INDEX" parameter is clearly present in the "LIMTS" tag code establishing the range. Anyone know a way to fix this? Is there a better/easier way to shade background y-axis ranges? It seems to be something that is not commonly used and sample code is sparse. Any assistance appreciated.
     
    Last edited: Mar 14, 2016
    137th Gebirg, Mar 14, 2016 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    You're using the wrong double quotes - I don't remember what those you have there in that code block is called, but the ones you NEED to use is this: " (straight double quotes) - I'm guessing that's what tripping it up?
     
    PoPSiCLe, Mar 15, 2016 IP
  3. 137th Gebirg

    137th Gebirg Active Member

    Messages:
    70
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #3
    Thanks for the response - yes, that appears to be some post-process formatting going on when using the "CODE" tag. In the actual code on the server, I am using straight ANSII double-quotes.
     
    137th Gebirg, Mar 16, 2016 IP