Skip to main content
kenc66324322
Inspiring
June 25, 2020
Question

CFChart type=JPG url attribute bug

  • June 25, 2020
  • 3 replies
  • 473 views

Hi there,

When creating a line chart of type JPG or PNG, incorrect $ITEMLABEL$ are passed to the javascript code specified in the url attribute if there are more than 10 data points in the x axis.

 

Just submited a bug report along with sample code to reproduce the problem. 

https://tracker.adobe.com/#/view/CF-4209142

 

Thought I may post here to in case someone has a better work around. 

 

Cheers

    This topic has been closed for replies.

    3 replies

    kenc66324322
    Inspiring
    May 22, 2021

    Unfortunately, the bug is still present in CF18 update 11 and Adobe has closed the bug saying it has been fixed. 

    BKBK
    Community Expert
    Community Expert
    May 22, 2021

    I added a comment to the ticket: "Hi Adobe ColdFusion Team, Please reopen this ticket."

    Participant
    May 23, 2021

    This issue also exists in ColdFusion 2016. I just encountered it yesterday with a barchart in png format. I am told by our server manager that we have all 2016 patches except the very latest - has this been addressed in the latest patch? It is a serious limition.

    BKBK
    Community Expert
    Community Expert
    June 26, 2020

    As I said earlier, if you look at the source code of the web page, you will see that there is an error in the Javascript that ColdFusion automatically generates for the chart. Underneath ColdFusion uses the ZingCharts library to generate the chart. This makes it difficult to work around. 

     

    The Javascripts are located at {CF_WEBROOT_DIRECTORY}\cf_scripts\scripts\chart\. Beware: these are system files. If you tamper with them you will run the risk of breaking much more than you fix.

     

    Your best bet is either

    1) to wait till the folks at Adobe fix the bug, or

    2) to use your own chart-generating library to generate the chart.

     

     

    kenc66324322
    Inspiring
    June 27, 2020

    At the moment, I have reduced the data points to 10, as I am charting 10 months of data instead of 12.  Fortunately, the bug does not affect html charts.  I have not switch to html charts as it is a global swtich in my code and some of my charts are emailed, which can only be done for type jpg or png.

     

    I had a look at cfchart-html.js but it is optimised for download anyway. 

    BKBK
    Community Expert
    Community Expert
    June 26, 2020

    Well spotted, Ken.  I have voted to have the bug urgently fixed. My comments were: "Urgent. Limiting the alerts to 10 is a serious limitation. In any case, if you look at the source code in the browser, you will [see] a glaring error being repeated."