How to draw pie chart using javascript | Community
Skip to main content
SahrudayaB
Level 2
December 28, 2021

How to draw pie chart using javascript

  • December 28, 2021
  • 1 reply
  • 2591 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

arunpatidar
Community Advisor
Community Advisor
December 28, 2021

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
SahrudayaB
Level 2
December 28, 2021

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>

arunpatidar
Community Advisor
Community Advisor
January 3, 2022

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>

Arun Patidar