Skip to main content
Participant
October 7, 2021
Question

CF11 Chart Animation - ColdFusion

  • October 7, 2021
  • 2 replies
  • 262 views

I am trying to get animation to work in CF11, CFChart. I can't it to work any input would be greatly appreciated.

My code is below. Arrows works, but plot does not.

<cfscript>
    arrows=[{"backgroundColor":"red","label":{"text":"Data for 2017","bold":true,"backgroundColor":"white"},
            "size":6,"FROM":{"x":200,"y":100},"to":{"x":400,"y":200}}];

        plot =   { 
            "animation": {
              "effect": "ANIMATION_FADE_IN",
              "speed": "2000"
                        }
                 }
</cfscript>

<CFSET FormsMarkedCompleted = 34>
<CFSET FormsMarkedNotCompleted = 21>
<CFSET TotalFormsEntered 40>

  <cfoutput>
      <cfchart 
        showygridlines="true" 
        gridlines="20" 
        type="bar"
       <!---  arrows="#arrows#" --->
        plot="#plot#"  
        chartHeight="320"
        chartWidth="800" 
        title="Number of competed forms and expected forms"  >
          <cfchartseries  >
            <cfchartdata item="Forms Marked Completed (#FormsMarkedCompleted#)" value="#FormsMarkedCompleted#" >   
            <cfchartdata item="Forms Marked Not Completed (#FormsMarkedNotCompleted#) " value="#FormsMarkedNotCompleted#"> 
            <cfchartdata item="Total Forms Entered (#TotalFormsEntered#)" value="#TotalFormsEntered#">
              
          </cfchartseries>
      </cfchart>
      </cfoutput>

 

    This topic has been closed for replies.

    2 replies

    BKBK
    Community Expert
    Community Expert
    October 16, 2021

    I found an error in your code:

    <CFSET TotalFormsEntered 40>

    After I corrected it to

    <CFSET TotalFormsEntered = 40>

    the code worked as expected.

    However, I am on CF2021 Update 2. 

    BKBK
    Community Expert
    Community Expert
    October 16, 2021

    Oh, another thing: delete the cfoutput tags. Not only are they unnecessary, they could cause problems with certain tags.

    mctobeyAuthor
    Participant
    October 19, 2021

    I added the = and removed the cfoutput, but unfortunaly the animation still does not work for me in CF11.

    Ged_Traynor
    Community Expert
    Community Expert
    October 7, 2021

    Moving thread to the ColdFusion forum from Using the Community