1

I am trying to create a d3 Chart from third party JavaScript file, calling the JavaScript function from Salesforce lightning component on afterScriptsLoaded event.

<ltng:require scripts='/resource/nv_d3_min_js,'
          afterScriptsLoaded="{!c.loadD3Chart}" />

and from loadD3Chart component function I am calling third party JavaScript function for generating the chart.

It's working perfectly fine when I load the page first time but when I come back to the page from another page it's not loading the chart on the page.

ex. In the home page, the chart is working fine but when I go to another page suppose Opportunity page and then come back to the home page by clicking Home menu, that time the third party JavaScript function is called but chart is not loading on the page.

I am new in Salesforce Lightning.

2
  • can you post the relevant code ?
    – Praveen
    Commented Apr 12, 2017 at 6:16
  • 1
    Looks like a similar issue which is addressed here
    – Praveen
    Commented Apr 12, 2017 at 6:19

0

Browse other questions tagged .