daru-view icon indicating copy to clipboard operation
daru-view copied to clipboard

Error When Using Highcharts / Googlecharts

Open matugm opened this issue 6 years ago • 19 comments

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:

  • Daru 0.2.1
  • Daru-View 0.2.4
  • Ruby 2.5

matugm avatar Jan 03 '19 15:01 matugm

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

Shekharrajak avatar Jan 03 '19 16:01 Shekharrajak

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?

matugm avatar Jan 08 '19 18:01 matugm

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.

Shekharrajak avatar Jan 09 '19 08:01 Shekharrajak

@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.

snpd25 avatar Feb 21 '19 18:02 snpd25

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

Shekharrajak avatar Feb 22 '19 06:02 Shekharrajak

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

snpd25 avatar Feb 24 '19 14:02 snpd25

@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.

Shekharrajak avatar Feb 24 '19 18:02 Shekharrajak

I tried it, but the error persists.

snpd25 avatar Feb 24 '19 19:02 snpd25

ping @Shekharrajak

snpd25 avatar Feb 26 '19 14:02 snpd25

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).

Shekharrajak avatar Feb 27 '19 05:02 Shekharrajak

@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

snpd25 avatar Feb 27 '19 07:02 snpd25

daru (0.2.1, 0.2.0)

Can you remove daru 0.2.1 version and try ?

Shekharrajak avatar Feb 27 '19 08:02 Shekharrajak

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!

snpd25 avatar Feb 27 '19 09:02 snpd25

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.

Shekharrajak avatar Feb 27 '19 09:02 Shekharrajak

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

snpd25 avatar Feb 27 '19 11:02 snpd25

Please let me know what commands you run.

Shekharrajak avatar Feb 27 '19 12:02 Shekharrajak

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

snpd25 avatar Feb 27 '19 12:02 snpd25

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

Shekharrajak avatar Feb 27 '19 13:02 Shekharrajak

It appeared in the terminal.

snpd25 avatar Feb 27 '19 15:02 snpd25