SciRuby / daru-view

daru-view is for easy and interactive plotting in web application & IRuby notebook. daru-view is a plugin gem to the existing daru gem.
https://sciruby.github.io/daru-view/
MIT License
95 stars 20 forks source link

Error When Using Highcharts / Googlecharts #130

Open matugm opened 5 years ago

matugm commented 5 years ago

Hi, when I try to use another plotting library other than the default I get an error.

Example:

require 'daru/view'

Daru::View.plotting_library = :googlecharts

df = Daru::DataFrame.new(
  {'Names' => %w(A B C), 'Data' => [2,3,5]}
)

Daru::View::Plot.new(df, {type: :bar, x: 'Names', y: 'Data'})

The error is:

NoMethodError
(undefined method `access_row_tuples_by_indexs' for #<Daru::DataFrame:0x00005598eae589f8>)

I'm using:

Shekharrajak commented 5 years ago

Hi @matugm,

Thanks for letting us know. Please use "daru" version '0.2.0' or the latest one from the SciRuby/daru.

daru-view have daru v0.2.0 dependency

matugm commented 5 years ago

Hi @Shekharrajak,

Thanks for your reply!

If I understand correctly daru-view is going to be merged as part of daru itself?

What's left to do? Is there a roadmap?

Shekharrajak commented 5 years ago

daru-view is plugin gem to daru, having lots of visualization features. You can go through this details and read more about the plans in daru-view/wiki/idea .

It will not be merged in daru repository. It can work independently.

Please let me know if you find any issue.

snpd25 commented 5 years ago

@Shekharrajak , I don't know where the problem lies here, this works fine in Jupyter Notebook Viewer, but is throwing the above mentioned error on my local iruby notebook in the 10th, 13th, 14th ,15th ,21st and 22nd cell . Will try to find the bug.

Shekharrajak commented 5 years ago

@snpd25 It looks like you are using older version of daru. Follow the comment https://github.com/SciRuby/daru-view/issues/130#issuecomment-451206643

snpd25 commented 5 years ago

@Shekharrajak, I am using "daru" version '0.2.1' .

Shekharrajak commented 5 years ago

@snpd25 , Uninstall daru and daru-view gem from your system and install daru-view gem from github source. Let me know if you still having the same issue.

snpd25 commented 5 years ago

I tried it, but the error persists.

snpd25 commented 5 years ago

ping @Shekharrajak

Shekharrajak commented 5 years ago

Can you share some details like gem list daru remove it and install it again gem install daru-view (0.2.5 version which has more fixes).

snpd25 commented 5 years ago

@Shekharrajak

*** LOCAL GEMS ***

daru (0.2.1, 0.2.0)
daru-data_tables (0.3.5)
daru-view (0.2.5)

bundle installs daru 0.2.0 Ruby 2.5.1

Shekharrajak commented 5 years ago

daru (0.2.1, 0.2.0)

Can you remove daru 0.2.1 version and try ?

snpd25 commented 5 years ago

Oh yes, @Shekharrajak , It works. But should we try to make it compatible with the latest version of daru as well? Just a suggestion. Thanks!

Shekharrajak commented 5 years ago

Oh yes, @Shekharrajak , It works. But should we try to make it compatible with the latest version of daru as well? Just a suggestion. Thanks!

I think, if you remove the 0.2.0 instead of 0.2.1, then also it will work.

snpd25 commented 5 years ago

Nope, it doesn't work with that and throws this warning: Could not load bundler: Could not find daru-0.2.0 in any of the sources

Shekharrajak commented 5 years ago

Please let me know what commands you run.

snpd25 commented 5 years ago

I uninstalled daru 0.2.0 using gem uninstall daru and then I installed daru 0.2.1. After that I started iruby notebook.

Shekharrajak commented 5 years ago

I uninstalled daru 0.2.0 using gem uninstall daru and then I installed daru 0.2.1. After that I started iruby notebook.

I didn't understand how running iruby notebook will return Could not load bundler: Could not find daru-0.2.0 in any of the sources

snpd25 commented 5 years ago

It appeared in the terminal.