Skip to main content
kenc66324322
Inspiring
Jun 25, 2020 4:58 AM UTC
Question

CFChart type=JPG url attribute bug

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 is closed to new replies. Start a new post to keep the conversation going.

    8 replies

    kenc66324322
    Inspiring
    May 22, 2021 3:54 AM UTC

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

    Translate
    BKBK
    Community Expert
    Community Expert
    May 22, 2021 10:37 AM UTC

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

    Translate
    Participant
    May 23, 2021 11:40 AM UTC

    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.

    Translate
    BKBK
    Community Expert
    Community Expert
    Jun 26, 2020 12:50 PM UTC

    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.

     

     

    Translate
    kenc66324322
    Inspiring
    Jun 27, 2020 4:32 AM UTC

    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. 

    Translate
    BKBK
    Community Expert
    Community Expert
    Jun 26, 2020 11:48 AM UTC

    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."

    Translate