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

require 'datatables' throws error #134

Closed lohani2280 closed 5 years ago

lohani2280 commented 5 years ago

I have installed IRuby notebook and 'daru-view' in my system as per the instructions mentioned here. However, while trying out my hands with this notebook example I get following error: screenshot from 2019-01-16 16-55-13

Shekharrajak commented 5 years ago

Hi @lohani2280 ,

It must be require 'daru/data_tables. Actually you can access it via daru-view API :

Daru::View.table_library = :datatables
datatable = Daru::View::Table.new([1,2,3,4]) 
datatable.export_html_file('./plot.html')

For more examples and API , you can check out the spec file .

datatables works fine in Web application but not in IRuby notebook. Refer : https://github.com/Shekharrajak/daru-data_tables/issues/2

lohani2280 commented 5 years ago

@Shekharrajak Thanks for the reply. It works now.