2

My requirement is to rebuild apps in Lightning component.Currently in existing apps , we have charts developed using Highchart.So anyone know if Lightning can be integrate with Highchart?If possible, please provide reference on this.

If this question considered improper, let me know so I can delete it right away.

1
  • On another level, Salesforce have charts.js library that was added back in June 2020.
    – Has Nah
    Commented Jan 21, 2021 at 21:08

5 Answers 5

2

You can use Highcharts or any other libraries with lightning.

First you need to upload your libraries (highcharts & jquery) as static resources to your org. To do that you go to Setup | Develop | Static Resources. You can learn more about it on Salesforce Documentation .

It might work with CDN too as http://code.highcharts.com/highcharts.js, but you might have problems with dependencies.

Once you have your libraries uploaded they will be available to you under /resources. You can then load then to your component and/or app using <ltng:require />.

<ltng:require scripts="/resource/jquery, /resource/highcharts, afterScriptsLoaded="{!c.AMethodOntheComponentController}" />
1
  • One of my colleague tried it , and it 's working good.Just a challenge that we might have number of chart dynamically so we need to figure out how to dynamically create the layout.
    – unidha
    Commented Sep 18, 2015 at 3:14
2

We have been using Highcharts and Highmaps in our org within Lightning Components and we've found a big problem while using Highcharts and Highmaps in the same Lightning App or Community or context. Highcharts has a problem loading in single page app structures and sometimes it does not load any map and it throws Highcharts error #16. However, if you are only using Highcharts you might not find any problem.

Error #16 loading Highcharts with Lightning Components

2

Please see Error #16 loading Highcharts with Lightning Components

0

Solution for Static Data: You have to upload your libraries i.e highcharts & jquery as static resources to your org. You have to go Setup | Develop | Static Resources.

0

As per my opinion, if you want to fetch real time data in high chart then you have to think by using external object.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .