1

I'm creating a chart and saving it as a PNG file. I'm trying to get CFCHART to format the Y Axis labels as "currency", but it's not applying the format.

Any idea what could be wrong? I'm on CF2018, version: 2018,0,10,320417

<cfchart format="png" chartWidth="#chartWidth#" chartHeight="400" font="arial" yAxisValues="#yAxisVals#" xAxis="#labelRotateStruct#" labelformat="currency" showlegend="true" name="myDataChart">
    <cfloop list="#yearList#" index="x">
        <cfchartseries type="bar" seriesLabel="#x#">
            <cfloop collection="#dataStruct#" item="key">
                <cfset temp = dataStruct[key] />
                <cfchartdata item="#key#" value="#temp[x]#"/>
            </cfloop>
        </cfchartseries>
    </cfloop>
</cfchart>      

<cffile action="write" file="#application.linkMediaRoot#\reports\generated\charts\#chartFileName#" output="#myDataChart#">

The chart comes out looking like this, no formatting on Y Axis even though I'm using labelformat="currency":

enter image description here

mwill81
  • 115
  • 7
  • Sounds like they removed support for "labelformat" when [cfchart was updated in CF10](https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-c/cfchart.html). *"...Note that the new look and feel will not be available for the following tag attributes: cfchart labelformat..."*. There's probably a ZingCharts equivalent, but I don't know it off the top of my head.. – SOS Mar 15 '21 at 17:28
  • @SOS I actually think this may be a bug, I don't think it would still be listed as a valid attribute if it had been deprecated. It sounds like they may have added some other new level of design, and whatever that enhancement was it won't be for that attribute. But it's still in the list as a valid attribute. I've opened a bug with them: https://tracker.adobe.com/#/view/CF-4211351. Thanks for your help!! – mwill81 Mar 16 '21 at 12:14
  • It is possible. I know they changed a lot of things when moving to Zingcharts, but I haven't played around with it enough to know for certain. Hopefully Adobe will clarify either way :) – SOS Mar 16 '21 at 14:54

0 Answers0