Using External JavaScript Libraries in Lightning Components

Lightning Component framework has a rich set of JavaScript APIs that you can use to build client-side logic. However, there are a lot of open source libraries and frameworks that provide rich functionalities but can take a considerable amount of effort to rewrite using Lightning Component framework's native JavaScript APIs. One example of such a situation is if you are looking to build charts with Salesforce data, then building all the CSS and client-side JavaScript from scratch can consume a lot of time. Instead, you can import libraries such as ChartJs (https://www.ChartJs.Org/), HighCharts (https://www.highcharts.com/), or D3 (https://github.com/d3/d3/wiki/Gallery) to meet charting ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.