ChartJS provides interactive and animated HTML 5 based javaScript charts. We can use these in Lightning components to display charts.
I have created a sample lightning app which display different charts by using salesforce data.
I am going to display opportunities amount(in millions) grouped by forecast category. First of all store the Chartjs file in static resource in order to use it in lightning components.
Download the Chartjs file which I am using from this link Chartjs download
You can download complete code along with static resource from below Github repository and deploy to your org.
Chartjs-in-Lightning-Sample-Code
Below is sample code used to display charts in above snapshot.
Hope this will help!!
I have created a sample lightning app which display different charts by using salesforce data.
I am going to display opportunities amount(in millions) grouped by forecast category. First of all store the Chartjs file in static resource in order to use it in lightning components.
Download the Chartjs file which I am using from this link Chartjs download
You can download complete code along with static resource from below Github repository and deploy to your org.
Chartjs-in-Lightning-Sample-Code
Below is sample code used to display charts in above snapshot.
Hope this will help!!
Hi,
ReplyDeleteif you change the point style line, locker service not work, check this:
https://developer.salesforce.com/forums/?id=9060G0000005ajXQAQ
Awesome Blog, I Loved it, Me first time here in the Blog. Totally Impressed.
ReplyDeleteSalesforce Lightning Training in Hyderabad | Salesforce Integration Training in Hyderabad
Can you use custom objects for the charts???
ReplyDeleteHow can you make the charts larger?
ReplyDeleteI unquestionably truly loved all aspects about free page view tracker USA and I likewise have you spared to fav to take a gander at new data in your site.
ReplyDelete