How to draw pie chart using javascript in AEM 6.5 and also how can I include script src links in js client library folder.
Views
Replies
Total Likes
Hi,
AEM does not provide any OOTB library to create pie charts.
you can explore some third party libraries e.g. https://www.anychart.com/blog/2017/12/06/pie-chart-create-javascript/
ok but how can I include these links in js file.
<script src="https://cdn.anychart.com/releases/8.0.1/js/anychart-core.min.js"></script>
<script src="https://cdn.anychart.com/releases/8.0.1/js/anychart-pie.min.js"></script>
Hi @SahrudayaB ,
You can include these external scripts in html file of page/headerlibs.
https://sourcedcode.com/blog/aem/how-to-include-javascript-for-an-aem-website
https://www.sfu.ca/cms/howto/advanced/style-a-page/customjavascript.html
Regards,
Santosh
I'm using AEM 6.5. I cannot see "custom stylesheet and javascript" in advanced tab under page properties. Where can I add external js file.
I was unable to add external script in html (html file in component). And also in js folder in client library. How can I add the third party library for adding pie chart.
Hi,
You can also directly add the below lines in component htl
<script defer src="https://cdn.anychart.com/releases/8.0.1/js/anychart-core.min.js"></script>
<script defer src="https://cdn.anychart.com/releases/8.0.1/js/anychart-pie.min.js"></script>
Views
Likes
Replies
Views
Likes
Replies