Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HighChart generating chart body part in html #30

Open
Shekharrajak opened this issue Jun 23, 2017 · 4 comments
Open

HighChart generating chart body part in html #30

Shekharrajak opened this issue Jun 23, 2017 · 4 comments
Labels

Comments

@Shekharrajak
Copy link
Member

In main LazyHighCharts gem the html code generated using high_charts method contains var onload = window.onload; , So this script can't show charts in iruby. I have removed onload var and used the main script to generate body part of the chart (modification in lib/adapters/highcarts/layout_helper_iruby.rb) . But there must be a html code that works in both webpage as well as iruby notebook. I tried few modifications but it was not working on both.

@v0dro
Copy link
Member

v0dro commented Jul 6, 2017

What is the exact reason behind onload not working with iruby? Post that here and we'll solve the problem together.

@Shekharrajak
Copy link
Member Author

Shekharrajak commented Jul 6, 2017

@v0dro , when we use onload in chart javascript then iruby don't display the chart instantly in the output cell of the IRuby notebook. Because of onload it execute script once a web page has completely loaded all content of the body part. (That why it was displaying chart correctly, when we download the notebook as html page or after saving notebook and restart) .

The problem was something like this : michelson/lazy_high_charts#236 (comment)

@v0dro
Copy link
Member

v0dro commented Jul 12, 2017

@mrkn @minad @zverok any idea on how this problem can be resolved?

@Shekharrajak
Copy link
Member Author

I see similar problem with JQuery code. Check this issue SciRuby/iruby#133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants