CFChart - Undefined tag

Are there issues with CFCHART in Lucee? Do I have to install a separate component?

When I try to execute a CFCHART I get an error →

“ERROR”,“ajp-nio-0:0:0:0:0:0:0:1-8009-exec-5”,“03/05/2024”,“12:04:06”,“”,"failure in C:\ACS\showtheoffer\control\reports\geo_displayreport.cfm;undefined tag [cfchart];lucee.runtime.exp.TemplateException: failure in C:\ACS\showtheoffer\reports\geo_displayreport.cfm;undefined tag [cfchart]

Thanks

Stack:

  • Windows Server 2022
  • IIS 10
  • Java 11.0.21
  • Tomcat Version 9.0
  • Lucee 6.0.0.585
  • MS SQL 2022

yes

https://download.lucee.org/#D46B46A9-A0E3-44E1-D972A04AC3A8DC10

3 options to install:

Chart Extension can also be installed via Lucee Admin > Extension > Application.

Thanks @kenricashe I now have it installed :slight_smile: Being a newbie to Lucee I actually forgot about the option to go to EXTENSIONS.

I do have an odd issue though, I’m logged into the dashboard, go to EXTENSIONS - APPLICATION, all good to hear, type CHART and hit FILTER and it kicks me out, saying “No access, password is invalid”. Log back in and there is CHART when I go back to EXTENSIONS. Go to install it, kicks me out again, log back in, it’s installed.

Would you know where I might report this as a bug?

Thanks

Just noting that many cfml devs have moved from native cfchart to purely frontend Javascript chart rendering alternatives, such as https://www.chartjs.org/. These are powerfull and often more flexible than cfchart.

But cfchart is still quite useful when static charts are required, such as in email notifications.

1 Like

I suggest creating a separate post for your recurring Lucee Admin authentication issue as that doesn’t sound specific to the cfchart extension.

Agreed. I thought it might be best reported as a potential bug, but I’m not sure where/how to report it

My experience has been that they prefer discussing it here first, and then usually @Zackster will instruct where/how to report it.

okay, I’ll create a new post

I set up the CFchart extension back in March and it worked well. I don’t remember having any installation/config issues. However I just came to run the code which I’ve not used since then and found that it is not working.

The graphs are just broken images

If I open the link for the images I get

401 - Unauthorized: Access is denied due to invalid credentials.
You do not have permission to view this directory or page using the credentials that you supplied.

The link is
https://MYDOMAIN.com/lucee/graph.cfm?img=258008915a0da97235c66cfdf91d0b45&type=png

This was a staging set up which I had just added SSL, and therefore it was now https so I removed the web.config (IIS10) to redirect to SSL and re-ran it on HTTP as it was before, and it still has the same issue.

I uninstalled the extension and reinstalled it, that didn’t help.

I do notice in my root that there is a folder called LUCEE, however there is no graph.cfm in there. It is possible that there was a file and when I copied all my files from my local side I cleaned it out and lost it. I’ve not created a graph.cfm so presume Lucee makes that, but the uninstall/reinstall did not fix it.

Anybody have any ideas?

Thanks

Mark

cfchart is more than oldschool. There are way better solutions to adopt, like chart.js. Please see it here https://www.chartjs.org/

I know chartjs was mentioned previously when I initially set up CFChart.

I’ve only got two charts in an internal dashboard. I don’t normally need charts so I’m a little reluctant to try and convert to another solution, especially since it was working

Try opening to view the chart from localhost, bypassing any firewall or webserver permission setting. Some lucee directories may be blocked by security settings that you have setup on your webserver.

If that doesn’t work, setting up a 3 charts with chart.js is as easy as here:

I created a drop of code to place a basic chart and ran it locally in C:\lucee\tomcat\webapps\ROOT using http://localhost:8888/graph.cfm and the graph appears

I then used the same code in the root of my domain, and it fails to display an image.

I decided to look at switching to chart.js. My initial attempt was a bit of a fail. I am not sure why but if I put a test chart at the top of the page with baked in data it displays, but as I move it down the page to the right place so I can populate with actual data from the query, keeping it the same with the baked in data, no graph appears.

Edit: I believe I found the issue above, I had a <b> that was not closed, and putting the code under that caused it to fail to display anything. I just need to figure out how to display more than one graph on the same page as below

Also I then tried to display two graphs, I figured I just give them unique ID’s but only the first one shows.

Edit: I realized I should be using xValues2 and yValues2 across the 2nd one.

It’s very cool, but I have to admit to get it to do a few fancy things like add the count of each record and the percentage of the total value in each mouse over of the pie chart, I had to use chatGPT.

Unfortunately it did give me a link to the CDN for an older version, then updated the code and gave me the new version but there were in compatibilities, all fixed now.

Although I don’t need any help now, I thought I would leave the post here for others

1 Like