ChartJs in Lightning Components

ChartJs is an open source JavaScript library that allows us to create various types of charts, such as line, bar, pie, and stacked charts, and many more. The library can be explored at https://www.ChartJs.Org/.

In this section, we will see a simple example of how to include the ChartJs library in Lightning Components and build visualizations with a dataset. 

The steps to integrate this library are the same as those in the preceding sections. The ChartJs library works well under Locker Service so there are no extra transformations required to integrate it.

The steps to create a Lightning Component with ChartJs are as follows:

  1. Create a static resource hosting the ChartJs library; download the ChartJs library ...

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.