Nyaplot basic example not working
Opened this issue · 2 comments
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?
@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.
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?