Expand my Community achievements bar.

How to draw pie chart using javascript

Avatar

Level 3

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.

6 Replies

Avatar

Community Advisor

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/

 



Arun Patidar

Avatar

Level 3

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.

Avatar

Level 3

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.

Avatar

Community Advisor

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>



Arun Patidar