Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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."
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Unfortunately, the bug is still present in CF18 update 11 and Adobe has closed the bug saying it has been fixed.
Copy link to clipboard
Copied
I added a comment to the ticket: "Hi Adobe ColdFusion Team, Please reopen this ticket."
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
With cfchartseries type="bar", in ColdFusion 2016, this occur when a chartseries contains more than 10 data points. Problem occurs with both format="png" and format="jpg". When I try format="html" and the following:
url="JAVAscript:ShowData('$ItemLabel$','$SeriesLabel$','#PCase(ThisVar)#');"
...I get a message that "JAVAscript:ShowData" does not exist. This url syntax works just find with the png and jpg formats (except for problem with incorrect values in $ItemLabel$ after tenth bar in series). (PCase is a function we have defined locally.)
Copy link to clipboard
Copied
I can reproduce the bug in CF18 with the latest patch, so it is likely that the bug is still there for CF16 with the latest patch.