Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Template Components in 23.1 with JavaScript

cc13comMay 31 2023

Hello,

I try to implement the new Template Components in my app (tested on OCI and apex.oracle.com). For that I created Template Component plugin with some HTML code and attributes in the partial part. All is working fine when I create a region on my page and select the TC plugin as type.

If I add the following code in my template and add all needed JS Code/Files (see post: https://www.linkedin.com/pulse/oracle-apex-report-chartjs-abdullah-azmi) the page is rendering and showing the line chart for the fraction of a second but then the line chart is gone. It may have something to do with “escape special characters” and the warning in the browser console “defineTemplates invalid escape value removed:”?

<div class="item">
        <div><canvas class="myChart chartjs-render-monitor" id="#CHART_ID#" height="50" data-z="#DATASETASARRAY#"> </canvas></div>
      </div>

And here are the code output in the browser console:

<canvas class="myChart chartjs-render-monitor" id="15" height="298" data-z="243,35,248,25,257,3,257,9,257,9,261,9,260,6,263,65,261,9,261,9,261,9,259,75,264,271,4,274,3,292,95,292,95,292,95,287,7,289,6,287,4,279,1,362,9,362,9,362,9,360,2,367,8" style="display: block; width: 1788px; height: 298px;" width="1788"> </canvas>
Comments
Post Details
Added on May 31 2023
1 comment
512 views