Skip to main content
Inspiring
March 6, 2024
Answered

Charts issue after CF2021 migration

  • March 6, 2024
  • 3 replies
  • 825 views

Hello All,

 

We recently migrated our application from CF2018 to CF2021 latest update 5 version. After we upgraded, we observed issue with our charts all over application.

There are some glitches created/observed in graphs and graph is not displaying properly.


Please help/advise if anyone has faced similar issue before.


Thanks,

Dhanshree Joshi

    This topic has been closed for replies.
    Correct answer dhanshreej63753772

    Can you show us the code that produced this?  We're flying blind without more info from you.


    Hello Both,

    I am able to resolve this issue. CF2021 has made changes to dateformat function. Because of that dateformat(now(), "mm-DD-yyyy") was treating DD as day of the year. Hence, chart was unable to put the dots to connect at right places. After I added -Dcoldfusion.datemask.useDasdayofmonth = true in JVM arguments, date is passed in right format. Hence, graphs are getting plot right now.
    You can refer to change in dateformat function at https://helpx.adobe.com/sg/coldfusion/kb/dateformat-function-coldfusion-2021.html link.

    3 replies

    Jane Rori
    Participant
    March 7, 2024

    Can you please tell me a solution?

    Charlie Arehart
    Community Expert
    Community Expert
    March 7, 2024

    Jane, a solution to what exactly? Please read all comments above before replying. You may find your answer, or an approach to help (or help us help you) get to one. 

    /Charlie (troubleshooter, carehart. org)
    Charlie Arehart
    Community Expert
    Community Expert
    March 6, 2024

    Beyond what Paul just offered, I was confirming that a simple example worked fine. So yes, first, you should confirm if a simple example that works for others would work on your server. And I offer such an example, where you can both view the code AND run it--against either cf2023, cf2021, or cf2018--at this gist on the Cffiddle site.

     

    And I'm saying you should first run that code there, then take that code (which is from the cf docs) and run it on your own server. Does it work for you there? If not, that's what we'd need to explore next.

     

    Then if it works, but some specific example of your own does not, then configure whatever example you have so that you can run it at the cffiddle.org site. Of course, you can't likely "just copy" your code there, because you likely pull your data from a database--and of course your db won't be available on that site. So you need to create a standalone example with enough static data to demonstrate your issue. And again, you can run your example on that site against all 3 latest cf versions, so if you'd contend the result in cf2021 was different from cf2018, you'll be able to demonstrate/prove that there.

     

    I realize this would take work, but it's a very effective approach. 

    /Charlie (troubleshooter, carehart. org)
    Participant
    March 7, 2024
    quote

    Beyond what Paul just offered, I was confirming that a simple example worked fine. So yes, first, you should confirm if a simple example that works for others would work on your server. And I offer such an example, where you can both view the code AND run it--against either cf2023, cf2021, or cf2018--at this gist on the Cffiddle site.

     

    And I'm saying you should first run that code there, then take that code (which is from the cf docs) and run it on your own server. Does it work for you there? If not, that's what we'd need to explore next.

     

    Then if it works, but some specific example of your own does not, then configure whatever example you have so that you can run it at the cffiddle.org site. Of course, you can't likely "just copy" your code there, because you likely pull your data from a database--and of course your db won't be available on that site. So you need to create a standalone example with enough static data to demonstrate your issue. And again, you can run your example on that site against all 3 latest cf versions, so if you'd contend the result in cf2021 was different from cf2018, you'll be able to demonstrate/prove that there.

     

    I realize this would take work, but it's a very effective approach. 


    By @Charlie Arehart

     

    Yeah it's really a very effective approach. 

    Legend
    March 6, 2024

    Can you show examples?  Adobe has changed the charting library in CF over the years and paid little attention to backward compatibility. 

    Inspiring
    March 6, 2024

    this is how graphs are impacted with glitches. Earlier it was very clear to read.

    Legend
    March 6, 2024

    Can you show us the code that produced this?  We're flying blind without more info from you.