GSoC 2108 Project [ Advance features in daru-view ] discussion

Discussions for the Google Summer of Code project 2018 : Advance features in daru-view

I feel that HighCharts ideas are more important. So how about working on HighStock & HighMaps, Custom styling CSS in HighCharts, Export the chart in various formats and other highcharts ideas first ?

@Prakriti, let me know if have any doubt or comments on this.


Ok. I will first complete the highcharts related work and will then start with the google charts. Should I change the timeline in the draft proposal accordingly?

I want to add another feature in google charts to show multiple charts, i.e., in an iruby notebook displaying more than one chart in the same cell and in web frameworks displaying more than one chart in the table row.
I want to make the changes in the timeline to add this feature also. Should I modify it accordingly?

Also, I was researching more about the idea to reduce the bunch of lines at the source HTML in the head tag but as each web framework uses different approach to incorporate the js files, I was not able to reach any solid conclusion. Can you please help me with this?

Hello @Prakriti,

It is better to write your approach(es) in docs (writing( i.e. describing) it here will not harm, so discuss your ideas with approaches openly). More you go into ideas more you will find. Write it down and let us know, if something can be improved.

Meanwhile I am expecting approaches, to solve IRuby notebook related things (custom css, DataTable display). Understand google_visualr, lazy_high_charts, daru-data_tables gem codebase and how it is extended in daru-view.

Since we removed some of the ideas (GoogleCharts DataView, highlighting stuff in DataTables) try to cover it by adding other tasks in that place. Demonstrating daru-view capabilities and working on already opened issues itself is time taker.


I have written down the approach to implement the feature. Can you please go through it once?
I have mostly understood the code base of these gems and how they have been extended in daru-view. I am trying to resolve those iruby related issues.
Also, I thought we have removed the feature to retrieve row data in DataTables and are still adding the feature to highlight rows and columns whenever the cursor hovers over the DataTables’s cells. It could be an optional feature from user’s point of view.

Regarding the approach to show DataTable in IRuby, HTML of the table class is generated as: Here, in table tag, there are backslashes occurring after each option which causes an error (maybe they ignore double inverted commas).

I modified the daru-data_tables’ code locally to see some changes. However, when I run some of the examples of datatables from daru-view in IRuby notebook they used the git repository of the daru-data_tables gem. I have even specified the local path of daru-data_tables in the daru-view gem but nothing happened. Running bundle info daru-data_tables shows: Is there any other way to use the local daru-data_tables gem?

As we are not allowed to add more than two links in a single comment, so adding in this comment.
I tried to run the above code with backslashes in a sample HTML as: which does not generate the datatable. But running the same without backslashes as: does.

Let us know your research and your approach.

I will think about it. Let me know usecase (how extendable it is , what other things user can do, what if user want to perform some other operations when cursor hover or clicked) for it and can it be done separately (i.e. using html,css in web application)?

Use this in Gemfile

gem 'gemname', path: '/path/to/gemname/.gemspecFile'

Alternate way is installing(build the gem and install) your local gem in your system and using it.

Of course, it is for escaping the double quote. After generating the js code, use google chrome devtool (or firefox) to understand the source code of the html page.

I tried to run the HTML code of DataTables directly here but it gave the same error as:

Javascript error adding output!
TypeError: $(…).DataTable is not a function

Then, I came across the discussion which resulted in the conclusion that the plugin is never loaded on nbviewer. I have also tried the hack told here but was not of much use. Is there anything else that we could try?

I think you changed the example. There is no such error.

That error will come when DataTables.js file is not loaded correctly.

iruby notebook is already loading the jquery.min.js which is one of the dependent file for DataTables (so we are not loading it). Another file named jquery.dataTables.js we are loading in iruby notebook which is messing(kind of) with iruby notebook’s dependent js (when notebook is exported as html page, we can see the <script src=""></script>) . You can see it working if you download/export as html page and remove the <script src=""></script> line.

Alternate way I can think of is loading the jquery.min.js and jquery.dataTables.js each time in cell before DataTable script.


Right now, I have looked into the approaches to incorporate js files in each web application separately and am still searching for some combined approach to achieve the same.

Let us know the detail about your approach for different web applications.

I have added the feature to implement HighStock class in daru-view. It can be tracked through this PR.

@Prakriti, let us know the points you want to discuss in hangout. We can schedule it on Sat - 19th May 2018 .