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

Nyaplot basic example not working #66

Open
lokeshh opened this issue Mar 23, 2016 · 2 comments
Open

Nyaplot basic example not working #66

lokeshh opened this issue Mar 23, 2016 · 2 comments

Comments

@lokeshh
Copy link

lokeshh commented Mar 23, 2016

Few days ago I filed this issue #65 and it turns out that not even basic examples which do not involve iRuby are working for me. I am using the latest nyaplot gem installed via gem install nyaplot.

This is the example I ran and below is my IRB output:

?> require 'nyaplot'
=> true
>> 
?> # Bar chart
?> plot = Nyaplot::Plot.new
=> #<Nyaplot::Plot:0x0000000320edf8 @properties={:diagrams=>[], :options=>{}}>
>> plot.add(:bar, ['Persian', 'Maine Coon', 'American Shorthair'], [10,20,30])
=> #<Nyaplot::Diagram:0x00000003200c08 @properties={:type=>:bar, :options=>{:x=>"data0", :y=>"data1"}, :data=>"191ab013-5f74-456e-98d0-ed422c72700c"}, @xrange=["Persian", "Maine Coon", "American Shorthair"], @yrange=[0, 30]>
>> plot.x_label("Species")
=> #<Nyaplot::Plot:0x0000000320edf8 @properties={:diagrams=>[#<Nyaplot::Diagram:0x00000003200c08 @properties={:type=>:bar, :options=>{:x=>"data0", :y=>"data1"}, :data=>"191ab013-5f74-456e-98d0-ed422c72700c"}, @xrange=["Persian", "Maine Coon", "American Shorthair"], @yrange=[0, 30]>], :options=>{:x_label=>"Species"}}>
>> plot.y_label("Number")
=> #<Nyaplot::Plot:0x0000000320edf8 @properties={:diagrams=>[#<Nyaplot::Diagram:0x00000003200c08 @properties={:type=>:bar, :options=>{:x=>"data0", :y=>"data1"}, :data=>"191ab013-5f74-456e-98d0-ed422c72700c"}, @xrange=["Persian", "Maine Coon", "American Shorthair"], @yrange=[0, 30]>], :options=>{:x_label=>"Species", :y_label=>"Number"}}>
>> plot.export_html("bar.html")
=> 2245

When I open "bar.html" in Firefox or Chromium I get blank page with "Nyaplot" as title of the page.

Here is the output to "bar.html" file.

Any suggestions?

@lokeshh
Copy link
Author

lokeshh commented Mar 23, 2016

@v0dro Could you run this script and tell if it's working for you? I've ran it on two PC's and it didn't worked on both of them.

@lokeshh
Copy link
Author

lokeshh commented Mar 23, 2016

Aha! I have a fix but I don't know where to apply it to. The fix is to replace http with https and it works fine.
I guess I will replace all http links I can find in the repository with https except for those whose https version doesn't work. This should probably fix it. Should I submit a fix for v2 or master branch?

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

No branches or pull requests

1 participant