1

I have made a lightning component which includes a chart rendered by Highcharts.

This component works when previewing the app. However, when the component is placed on a employee community page using the community builder, I get

Highcharts Error #13 (Rendering div not found)

on page load.

Has anyone experienced similar, or know why this is happening?

Div in component:

<ltng:require scripts="/resource/Highcharts506/code/highcharts.js" afterScriptsLoaded='{!c.onHighchartsLoaded}'/>

<div id="container" style="width:100%; height:400px;"></div>

The onHighchartsLoaded method calls the Highcharts rendering:

Highcharts.chart('container', {...});
5
  • Please add the code snippets to assist you further Jan 5, 2017 at 23:39
  • Add a little bit, but not exactly sure what could be helpful - the code is a very basic use case of Highcharts
    – nicstella
    Jan 5, 2017 at 23:46
  • Would like to see component markup and the JavaScript controller code Jan 5, 2017 at 23:47
  • The two lines shown are effectively the component markup and controller code for the chart as far as I understand
    – nicstella
    Jan 5, 2017 at 23:56
  • How do you import the high chart library ? Ltng:require Jan 5, 2017 at 23:57

1 Answer 1

2

As Doug Chasman answered on this question this link there is an issue with static resources in Spring'17. The issue is being tracked in R&D by W-3615844

Except this, are you that you're targeting the div correctly when calling Highcharts ? Maybe try with a component.find or document.getElementById ?

You must log in to answer this question.

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