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

Issue with Arrow and Bar Formatters #118

Open
Prakriti-nith opened this issue Aug 6, 2018 · 7 comments
Open

Issue with Arrow and Bar Formatters #118

Prakriti-nith opened this issue Aug 6, 2018 · 7 comments

Comments

@Prakriti-nith
Copy link
Contributor

Out of these six formatters, Arrow and Bar are causing some issues and rest are working fine. Bar formatter is working correctly in rails but in IRuby notebook it generates weird bars. See examples. Arrow formatter is neither generating arrows in nbviewer (working fine in localhost) nor in rails.

@Shekharrajak
Copy link
Member

Shekharrajak commented Dec 4, 2018

iframe html tag can help to solve these kinds of issues. Refer : https://www.w3schools.com/tags/att_iframe_srcdoc.asp

We have to use our html code for the chart as the srcdoc in iframe tag.

@snpd25
Copy link
Contributor

snpd25 commented Feb 5, 2019

@Shekharrajak can you give an insight of how the appropriate code would have worked in the example

@Prakriti-nith
Copy link
Contributor Author

@snpd25 Check these examples of Arrow formatter and bar formatter from Google Charts. Also run these rails examples to know how the bar formatter is working in rails.

@snpd25
Copy link
Contributor

snpd25 commented Feb 6, 2019

Thanks @Prakriti-nith , actually I am new to the code base, can you please tell me which file/code-snippet needs modification?
Thanks.

@Prakriti-nith
Copy link
Contributor Author

Have a look at the to_html method which generates the HTML code for the chart.

@snpd25
Copy link
Contributor

snpd25 commented Feb 10, 2019

@Prakriti-nith , I have checked all the methods related to the formatters and they are all according to the googlecharts api documentation, but the html-script generated for the bar is this:
<span style="padding: 0; float: left; white-space: nowrap;"><img style="padding: 0" src="https://ajax.googleapis.com/ajax/static/modules/gviz/1.0/util/bar_s.png" height="12" width="1" /><img style="padding: 0" src="https://ajax.googleapis.com/ajax/static/modules/gviz/1.0/util/bar_b.png" height="12" width="9" /><img style="padding: 0" src="https://ajax.googleapis.com/ajax/static/modules/gviz/1.0/util/bar_w.png" height="12" width="1" /><img style="padding: 0" src="https://ajax.googleapis.com/ajax/static/modules/gviz/1.0/util/bar_s.png" height="12" width="1" /> 1,000</span>

@Shekharrajak
Copy link
Member

I think there is conflict in jupyter notebook html (JS) and googleapi JS in the html of the notebook (when it serve in browser).

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

No branches or pull requests

3 participants