michelson / lazy_high_charts

Make highcharts a la ruby , works in rails 5.X / 4.X / 3.X, and other ruby web frameworks

Home Page:http://www.suipit.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with defer loading in Rails

kosappi opened this issue · comments

If defer attribute is given to javascript_include_tag in Rails, no chart is drawn.

When I execute Highcharts.chart(… from devtool of the browser, it is drawn, so I expect that there is a problem with the execution timing.


This problem did not occur with using addEventListener instead of window.onload.
So I committed my fix to forked repository.
kosappi@620180d
I tested this commit with my Rails application.


I completed the 4 steps below:

via: https://github.com/michelson/lazy_high_charts#contributing

welcome pr on this patch.

@xiaods

Thank you for reading this issue.

I created pr.
#254