Closed kosappi closed 4 years ago
If defer attribute is given to javascript_include_tag in Rails, no chart is drawn.
defer
javascript_include_tag
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.
Highcharts.chart(…
This problem did not occur with using addEventListener instead of window.onload. So I committed my fix to forked repository. https://github.com/kosappi/lazy_high_charts/commit/620180d664b1987cebec3defbd8e23cba4fbad00 I tested this commit with my Rails application.
addEventListener
window.onload
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. https://github.com/michelson/lazy_high_charts/pull/254
If
defer
attribute is given tojavascript_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 ofwindow.onload
. So I committed my fix to forked repository. https://github.com/kosappi/lazy_high_charts/commit/620180d664b1987cebec3defbd8e23cba4fbad00 I tested this commit with my Rails application.I completed the 4 steps below:
via: https://github.com/michelson/lazy_high_charts#contributing