diff --git a/lib/daru/view/adapters/highcharts/display.rb b/lib/daru/view/adapters/highcharts/display.rb
index b1233ed..4cd6b22 100644
--- a/lib/daru/view/adapters/highcharts/display.rb
+++ b/lib/daru/view/adapters/highcharts/display.rb
@@ -3,7 +3,7 @@
module LazyHighCharts
def self.init_script(
- dependent_js=['highstock.js', 'modules/exporting.js',
+ dependent_js=['highstock.js', 'highcharts-more.js', 'modules/exporting.js',
'highcharts-3d.js', 'modules/data.js']
)
# Highstock is based on Highcharts, meaning it has all the core
@@ -33,13 +33,23 @@ class HighChart
#
def to_html(placeholder=random_canvas_id)
chart_hash_must_be_present
- high_chart(placeholder, self)
+ # Helps to denote either of the three classes.
+ chart_class = extract_chart_class
+ # When user wants to plot a HighMap
+ if chart_class == 'Map'
+ high_map(placeholder, self)
+ # When user wants to plot a HighStock
+ elsif chart_class == 'StockChart'
+ high_stock(placeholder, self)
+ # When user wants to plot a HighChart
+ elsif chart_class == 'Chart'
+ high_chart(placeholder, self)
+ end
end
def show_in_iruby(placeholder=random_canvas_id)
# TODO : placeholder pass, in plot#div
- chart_hash_must_be_present
- IRuby.html high_chart_iruby(placeholder, self)
+ IRuby.html to_html_iruby(placeholder)
end
# This method is not needed if `to_html` generates the same code. Here
@@ -48,7 +58,20 @@ def show_in_iruby(placeholder=random_canvas_id)
def to_html_iruby(placeholder=random_canvas_id)
# TODO : placeholder pass, in plot#div
chart_hash_must_be_present
- high_chart_iruby(placeholder, self)
+ high_chart_iruby(extract_chart_class, placeholder, self)
+ end
+
+ # @return [String] the class of the chart
+ def extract_chart_class
+ # Provided by user and can take two values ('stock' or 'map').
+ chart_class = options.delete(:chart_class).to_s.capitalize unless
+ options[:chart_class].nil?
+ chart_class = 'StockChart' if chart_class == 'Stock'
+ chart_class = 'Chart' if chart_class.nil?
+ unless %w[Chart StockChart Map].include?(chart_class)
+ raise 'chart_class must be selected as either chart, stock or map'
+ end
+ chart_class
end
def chart_hash_must_be_present
diff --git a/lib/daru/view/adapters/highcharts/iruby_notebook.rb b/lib/daru/view/adapters/highcharts/iruby_notebook.rb
index aec107a..2b09368 100644
--- a/lib/daru/view/adapters/highcharts/iruby_notebook.rb
+++ b/lib/daru/view/adapters/highcharts/iruby_notebook.rb
@@ -9,7 +9,7 @@ def self.generate_init_code(dependent_js)
# Enable to show plots on IRuby notebook
def self.init_iruby(
- dependent_js=['highcharts.js', 'modules/exporting.js',
+ dependent_js=['highstock.js', 'highcharts-more.js', 'modules/exporting.js',
'highcharts-3d.js', 'modules/data.js']
)
# TODO: include highstock.js for highstock and modules/*.js files for
diff --git a/lib/daru/view/adapters/highcharts/layout_helper_iruby.rb b/lib/daru/view/adapters/highcharts/layout_helper_iruby.rb
index 52d368c..e8c1982 100644
--- a/lib/daru/view/adapters/highcharts/layout_helper_iruby.rb
+++ b/lib/daru/view/adapters/highcharts/layout_helper_iruby.rb
@@ -1,13 +1,11 @@
module LazyHighCharts
module LayoutHelper
- def high_chart_iruby(placeholder, object, &block)
+ def high_chart_iruby(chart_class, placeholder, object, &block)
object.html_options[:id] = placeholder
object.options[:chart][:renderTo] = placeholder
- high_graph_iruby(placeholder, object, &block).concat(content_tag('div', '', object.html_options))
- end
-
- def high_graph_iruby(placeholder, object, &block)
- build_html_output_iruby('Chart', placeholder, object, &block)
+ build_html_output_iruby(
+ chart_class, placeholder, object, &block
+ ).concat(content_tag('div', '', object.html_options))
end
private
@@ -29,18 +27,18 @@ def encapsulate_js_iruby(core_js)
"#{js_start_iruby} #{core_js} #{js_end_iruby}"
# Turbolinks.version < 5
elsif defined?(Turbolinks) && request_is_referrer?
- to_s(eventlistener_page_load)
+ eventlistener_page_load(core_js)
elsif defined?(Turbolinks) && request_turbolinks_5_tureferrer?
- to_s(eventlistener_turbolinks_load)
+ eventlistener_turbolinks_load(core_js)
else
- to_s(call_core_js)
+ call_core_js(core_js)
end
defined?(raw) ? raw(js_output) : js_output
end
# rubocop:enable Metrics/PerceivedComplexity
- def eventlistener_page_load
+ def eventlistener_page_load(core_js)
<<-EOJS
#{js_start_iruby}
var f = function(){
@@ -52,7 +50,7 @@ def eventlistener_page_load
EOJS
end
- def eventlistener_turbolinks_load
+ def eventlistener_turbolinks_load(core_js)
<<-EOJS
#{js_start_iruby}
document.addEventListener("turbolinks:load", function() {
@@ -62,7 +60,7 @@ def eventlistener_turbolinks_load
EOJS
end
- def call_core_js
+ def call_core_js(core_js)
<<-EOJS
#{js_start_iruby}
#{core_js}
diff --git a/lib/daru/view/templates/highcharts/init.inline.js.erb b/lib/daru/view/templates/highcharts/init.inline.js.erb
index 23face6..140d616 100644
--- a/lib/daru/view/templates/highcharts/init.inline.js.erb
+++ b/lib/daru/view/templates/highcharts/init.inline.js.erb
@@ -13,4 +13,3 @@ var event = document.createEvent("HTMLEvents");
event.initEvent("load_highcharts", false, false);
window.dispatchEvent(event);
console.log("Finish loading highchartsjs");
-
diff --git a/spec/adapters/highcharts/display_spec.rb b/spec/adapters/highcharts/display_spec.rb
new file mode 100644
index 0000000..df0471a
--- /dev/null
+++ b/spec/adapters/highcharts/display_spec.rb
@@ -0,0 +1,222 @@
+require 'spec_helper.rb'
+
+describe LazyHighCharts do
+ before { Daru::View.plotting_library = :highcharts }
+ describe "#init_script" do
+ it "generates valid initial script" do
+ js = LazyHighCharts.init_script
+ expect(js).to match(/BEGIN highstock.js/i)
+ expect(js).to match(/Highstock JS/i)
+ expect(js).to match(/END highstock.js/i)
+ expect(js).to match(/BEGIN highcharts-more.js/i)
+ expect(js).to match(/END highcharts-more.js/i)
+ expect(js).to match(/BEGIN modules\/exporting.js/i)
+ expect(js).to match(/END modules\/exporting.js/i)
+ expect(js).to match(/BEGIN highcharts-3d.js/i)
+ expect(js).to match(/END highcharts-3d.js/i)
+ expect(js).to match(/BEGIN modules\/data.js/i)
+ expect(js).to match(/END modules\/data.js/i)
+ expect(js).to match(/\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 5,
@@ -15472,14 +249,12 @@
{
"cell_type": "code",
"execution_count": 6,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/plain": [
- "\"\\n\\n
\\n \\n \\n Num1 | \\n Num2 | \\n Num3 | \\n
\\n
\""
+ "\"\\n\\n\\n \\n \\n Num1 | \\n Num2 | \\n Num3 | \\n
\\n
\""
]
},
"execution_count": 6,
@@ -15510,9 +285,7 @@
{
"cell_type": "code",
"execution_count": 7,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -15523,7 +296,7 @@
"$(document).ready(function() {\n",
"\n",
" $('#table_id4').DataTable(\n",
- " {pageLength: 3, data: [[1,11,11],[2,12,22],[3,13,33],[4,14,44],[5,15,55]]}\n",
+ " {pageLength: 3}\n",
" );\n",
"\n",
"});\n",
@@ -15538,7 +311,7 @@
" "
],
"text/plain": [
- "\"\\n\\n\\n \\n \\n Num1 | \\n Num2 | \\n Num3 | \\n
\\n
\""
+ "\"\\n\\n\\n \\n \\n Num1 | \\n Num2 | \\n Num3 | \\n
\\n
\""
]
},
"execution_count": 7,
@@ -15553,25 +326,21 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -15579,7 +348,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Chart | Line Chart.ipynb b/spec/dummy_iruby/Google Chart | Line Chart.ipynb
index 4cc2f39..3aae520 100644
--- a/spec/dummy_iruby/Google Chart | Line Chart.ipynb
+++ b/spec/dummy_iruby/Google Chart | Line Chart.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -355,9 +393,7 @@
{
"cell_type": "code",
"execution_count": 3,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -449,26 +485,24 @@
{
"cell_type": "code",
"execution_count": 4,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 4,
@@ -485,26 +519,24 @@
{
"cell_type": "code",
"execution_count": 5,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 5,
@@ -526,9 +558,7 @@
{
"cell_type": "code",
"execution_count": 6,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -549,9 +579,7 @@
{
"cell_type": "code",
"execution_count": 7,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -644,26 +672,24 @@
{
"cell_type": "code",
"execution_count": 8,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 8,
@@ -691,33 +717,31 @@
},
{
"cell_type": "code",
- "execution_count": 39,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 9,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 39,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@@ -744,10 +768,8 @@
},
{
"cell_type": "code",
- "execution_count": 40,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 10,
+ "metadata": {},
"outputs": [
{
"data": {
@@ -755,7 +777,7 @@
"#"
]
},
- "execution_count": 40,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@@ -766,10 +788,8 @@
},
{
"cell_type": "code",
- "execution_count": 41,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 11,
+ "metadata": {},
"outputs": [
{
"data": {
@@ -777,7 +797,7 @@
"#"
]
},
- "execution_count": 41,
+ "execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
@@ -788,30 +808,28 @@
},
{
"cell_type": "code",
- "execution_count": 42,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 12,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 42,
+ "execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
@@ -829,30 +847,28 @@
},
{
"cell_type": "code",
- "execution_count": 43,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 13,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 43,
+ "execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
@@ -899,33 +915,31 @@
},
{
"cell_type": "code",
- "execution_count": 44,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 14,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 44,
+ "execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
@@ -955,30 +969,28 @@
},
{
"cell_type": "code",
- "execution_count": 46,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 15,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 46,
+ "execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
@@ -994,30 +1006,28 @@
},
{
"cell_type": "code",
- "execution_count": 59,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 16,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 59,
+ "execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
@@ -1041,33 +1051,31 @@
},
{
"cell_type": "code",
- "execution_count": 64,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 17,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 64,
+ "execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
@@ -1095,30 +1103,28 @@
},
{
"cell_type": "code",
- "execution_count": 67,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 18,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 67,
+ "execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
@@ -1134,30 +1140,28 @@
},
{
"cell_type": "code",
- "execution_count": 69,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 19,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 69,
+ "execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
@@ -1184,30 +1188,28 @@
},
{
"cell_type": "code",
- "execution_count": 74,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 20,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 74,
+ "execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
@@ -1235,30 +1237,28 @@
},
{
"cell_type": "code",
- "execution_count": 77,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 21,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 77,
+ "execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
@@ -1292,30 +1292,28 @@
},
{
"cell_type": "code",
- "execution_count": 78,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 22,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 78,
+ "execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
@@ -1364,16 +1362,14 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -1381,7 +1377,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Chart | Area Chart.ipynb b/spec/dummy_iruby/Google Chart | Area Chart.ipynb
index df5ef14..eb01139 100644
--- a/spec/dummy_iruby/Google Chart | Area Chart.ipynb
+++ b/spec/dummy_iruby/Google Chart | Area Chart.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -354,33 +392,31 @@
},
{
"cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 3,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 4,
+ "execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
@@ -399,30 +435,28 @@
},
{
"cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 4,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 9,
+ "execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -438,30 +472,28 @@
},
{
"cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 5,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 12,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -486,30 +518,28 @@
},
{
"cell_type": "code",
- "execution_count": 17,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 6,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 17,
+ "execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -535,30 +565,28 @@
},
{
"cell_type": "code",
- "execution_count": 15,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 7,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 15,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -581,16 +609,14 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -598,7 +624,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Chart | Bar Chart.ipynb b/spec/dummy_iruby/Google Chart | Bar Chart.ipynb
index 6cd8a04..d924cf9 100644
--- a/spec/dummy_iruby/Google Chart | Bar Chart.ipynb
+++ b/spec/dummy_iruby/Google Chart | Bar Chart.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -361,10 +399,8 @@
},
{
"cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 3,
+ "metadata": {},
"outputs": [
{
"data": {
@@ -445,7 +481,7 @@
" 4 Philadelph 1526000"
]
},
- "execution_count": 10,
+ "execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
@@ -466,33 +502,31 @@
},
{
"cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 4,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 12,
+ "execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -504,30 +538,28 @@
},
{
"cell_type": "code",
- "execution_count": 16,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 5,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 16,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -543,30 +575,28 @@
},
{
"cell_type": "code",
- "execution_count": 18,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 6,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 18,
+ "execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -598,33 +628,31 @@
},
{
"cell_type": "code",
- "execution_count": 19,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 7,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 19,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -649,37 +677,35 @@
},
{
"cell_type": "code",
- "execution_count": 20,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 8,
+ "metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
- "(pry):173: warning: key :height is duplicated and overwritten on line 177\n"
+ "(pry):55: warning: key :height is duplicated and overwritten on line 59\n"
]
},
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 20,
+ "execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@@ -700,33 +726,31 @@
},
{
"cell_type": "code",
- "execution_count": 23,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 9,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 23,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@@ -751,37 +775,35 @@
},
{
"cell_type": "code",
- "execution_count": 24,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 10,
+ "metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
- "(pry):222: warning: key :height is duplicated and overwritten on line 226\n"
+ "(pry):81: warning: key :height is duplicated and overwritten on line 85\n"
]
},
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 24,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@@ -802,33 +824,31 @@
},
{
"cell_type": "code",
- "execution_count": 27,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 11,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 27,
+ "execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
@@ -850,37 +870,35 @@
},
{
"cell_type": "code",
- "execution_count": 28,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 12,
+ "metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
- "(pry):268: warning: key :height is duplicated and overwritten on line 272\n"
+ "(pry):104: warning: key :height is duplicated and overwritten on line 108\n"
]
},
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 28,
+ "execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
@@ -908,33 +926,31 @@
},
{
"cell_type": "code",
- "execution_count": 29,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 13,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 29,
+ "execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
@@ -962,30 +978,28 @@
},
{
"cell_type": "code",
- "execution_count": 32,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 14,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 32,
+ "execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
@@ -1005,33 +1019,31 @@
},
{
"cell_type": "code",
- "execution_count": 34,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 15,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 34,
+ "execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
@@ -1051,30 +1063,28 @@
},
{
"cell_type": "code",
- "execution_count": 38,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 16,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 38,
+ "execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
@@ -1092,30 +1102,28 @@
},
{
"cell_type": "code",
- "execution_count": 40,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 17,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 40,
+ "execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
@@ -1134,30 +1142,28 @@
},
{
"cell_type": "code",
- "execution_count": 42,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 18,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 42,
+ "execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
@@ -1187,33 +1193,31 @@
},
{
"cell_type": "code",
- "execution_count": 44,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 19,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 44,
+ "execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
@@ -1233,30 +1237,28 @@
},
{
"cell_type": "code",
- "execution_count": 49,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 20,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 49,
+ "execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
@@ -1277,33 +1279,31 @@
},
{
"cell_type": "code",
- "execution_count": 66,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 21,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 66,
+ "execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
@@ -1324,30 +1324,28 @@
},
{
"cell_type": "code",
- "execution_count": 69,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 22,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 69,
+ "execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
@@ -1369,16 +1367,14 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -1386,7 +1382,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Chart | Bubble Chart.ipynb b/spec/dummy_iruby/Google Chart | Bubble Chart.ipynb
index bf849fb..f1cf536 100644
--- a/spec/dummy_iruby/Google Chart | Bubble Chart.ipynb
+++ b/spec/dummy_iruby/Google Chart | Bubble Chart.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -355,29 +393,27 @@
{
"cell_type": "code",
"execution_count": 3,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 3,
@@ -405,30 +441,28 @@
},
{
"cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 4,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 6,
+ "execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -444,30 +478,28 @@
},
{
"cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 5,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 7,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -496,10 +528,8 @@
},
{
"cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 6,
+ "metadata": {},
"outputs": [
{
"data": {
@@ -632,7 +662,7 @@
" 6 68 477 80"
]
},
- "execution_count": 8,
+ "execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -655,30 +685,28 @@
},
{
"cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 7,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 10,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -694,30 +722,28 @@
},
{
"cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 8,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 11,
+ "execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@@ -739,30 +765,28 @@
},
{
"cell_type": "code",
- "execution_count": 18,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 9,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 18,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@@ -791,30 +815,28 @@
},
{
"cell_type": "code",
- "execution_count": 19,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 10,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 19,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@@ -841,16 +863,14 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -858,7 +878,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Chart | Candlestick Chart.ipynb b/spec/dummy_iruby/Google Chart | Candlestick Chart.ipynb
index 6b6fe2f..4e62181 100644
--- a/spec/dummy_iruby/Google Chart | Candlestick Chart.ipynb
+++ b/spec/dummy_iruby/Google Chart | Candlestick Chart.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -355,9 +393,7 @@
{
"cell_type": "code",
"execution_count": 3,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -495,30 +531,28 @@
},
{
"cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 4,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 7,
+ "execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -537,30 +571,28 @@
},
{
"cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 5,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 9,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -582,16 +614,14 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -599,7 +629,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Chart | Combo Chart.ipynb b/spec/dummy_iruby/Google Chart | Combo Chart.ipynb
index bc181f1..380a6b0 100644
--- a/spec/dummy_iruby/Google Chart | Combo Chart.ipynb
+++ b/spec/dummy_iruby/Google Chart | Combo Chart.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -354,33 +392,31 @@
},
{
"cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 3,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 8,
+ "execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
@@ -401,30 +437,28 @@
},
{
"cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 4,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 7,
+ "execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -453,16 +487,14 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -470,7 +502,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Chart | Histogram.ipynb b/spec/dummy_iruby/Google Chart | Histogram.ipynb
index b1a57dc..d5a551a 100644
--- a/spec/dummy_iruby/Google Chart | Histogram.ipynb
+++ b/spec/dummy_iruby/Google Chart | Histogram.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -355,9 +393,7 @@
{
"cell_type": "code",
"execution_count": 3,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -701,29 +737,27 @@
{
"cell_type": "code",
"execution_count": 4,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 4,
@@ -745,30 +779,28 @@
},
{
"cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 5,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 6,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -786,30 +818,28 @@
},
{
"cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 6,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 8,
+ "execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -829,30 +859,28 @@
},
{
"cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 7,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 9,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -871,10 +899,8 @@
},
{
"cell_type": "code",
- "execution_count": 21,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 8,
+ "metadata": {},
"outputs": [
{
"data": {
@@ -882,7 +908,7 @@
"[0.9, 1.2, 1.5, 1.8, 2.0, 2.7, 3.4, 4.6, 5.5, 6.1, 7.9, 9.1, 12.2, 15.2, 21.0, 22.9, 27.1, 30.5, 36.6, 45.7]"
]
},
- "execution_count": 21,
+ "execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@@ -893,30 +919,28 @@
},
{
"cell_type": "code",
- "execution_count": 22,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 9,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 22,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@@ -954,10 +978,8 @@
},
{
"cell_type": "code",
- "execution_count": 27,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 10,
+ "metadata": {},
"outputs": [
{
"data": {
@@ -1090,7 +1112,7 @@
" 6 -0.3333333 0 nil nil"
]
},
- "execution_count": 27,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@@ -1113,30 +1135,28 @@
},
{
"cell_type": "code",
- "execution_count": 28,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 11,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 28,
+ "execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
@@ -1157,16 +1177,14 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -1174,7 +1192,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Chart | Org Chart.ipynb b/spec/dummy_iruby/Google Chart | Org Chart.ipynb
index bdd5f71..5f63ff6 100644
--- a/spec/dummy_iruby/Google Chart | Org Chart.ipynb
+++ b/spec/dummy_iruby/Google Chart | Org Chart.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -354,33 +392,31 @@
},
{
"cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 3,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 7,
+ "execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
@@ -409,30 +445,28 @@
},
{
"cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 4,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 9,
+ "execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -449,16 +483,14 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -466,7 +498,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Chart | Pie Chart.ipynb b/spec/dummy_iruby/Google Chart | Pie Chart.ipynb
index 7521718..c62124a 100644
--- a/spec/dummy_iruby/Google Chart | Pie Chart.ipynb
+++ b/spec/dummy_iruby/Google Chart | Pie Chart.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -355,29 +393,27 @@
{
"cell_type": "code",
"execution_count": 3,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 3,
@@ -400,30 +436,28 @@
},
{
"cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 4,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 7,
+ "execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -439,30 +473,28 @@
},
{
"cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 5,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 10,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -485,30 +517,28 @@
},
{
"cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 6,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 11,
+ "execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -524,30 +554,28 @@
},
{
"cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 7,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 12,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -574,33 +602,31 @@
},
{
"cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 8,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 13,
+ "execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@@ -619,30 +645,28 @@
},
{
"cell_type": "code",
- "execution_count": 18,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 9,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 18,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@@ -657,30 +681,28 @@
},
{
"cell_type": "code",
- "execution_count": 19,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 10,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 19,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@@ -706,33 +728,31 @@
},
{
"cell_type": "code",
- "execution_count": 22,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 11,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 22,
+ "execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
@@ -754,30 +774,28 @@
},
{
"cell_type": "code",
- "execution_count": 24,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 12,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 24,
+ "execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
@@ -793,30 +811,28 @@
},
{
"cell_type": "code",
- "execution_count": 26,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 13,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 26,
+ "execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
@@ -847,10 +863,8 @@
},
{
"cell_type": "code",
- "execution_count": 27,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 14,
+ "metadata": {},
"outputs": [
{
"data": {
@@ -901,7 +915,7 @@
" 1 25"
]
},
- "execution_count": 27,
+ "execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
@@ -918,30 +932,28 @@
},
{
"cell_type": "code",
- "execution_count": 30,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 15,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 30,
+ "execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
@@ -953,30 +965,28 @@
},
{
"cell_type": "code",
- "execution_count": 32,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 16,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 32,
+ "execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
@@ -1006,10 +1016,8 @@
},
{
"cell_type": "code",
- "execution_count": 35,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 17,
+ "metadata": {},
"outputs": [
{
"data": {
@@ -1090,7 +1098,7 @@
" 4 Anchovies 9"
]
},
- "execution_count": 35,
+ "execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
@@ -1111,30 +1119,28 @@
},
{
"cell_type": "code",
- "execution_count": 40,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 18,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 40,
+ "execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
@@ -1152,16 +1158,14 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -1169,7 +1173,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Chart | Stepped Area Chart.ipynb b/spec/dummy_iruby/Google Chart | Stepped Area Chart.ipynb
index f77ff0f..9a41c03 100644
--- a/spec/dummy_iruby/Google Chart | Stepped Area Chart.ipynb
+++ b/spec/dummy_iruby/Google Chart | Stepped Area Chart.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -355,29 +393,27 @@
{
"cell_type": "code",
"execution_count": 3,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 3,
@@ -400,30 +436,28 @@
},
{
"cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 4,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 5,
+ "execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -439,30 +473,28 @@
},
{
"cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 5,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 4,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -481,30 +513,28 @@
},
{
"cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 6,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 7,
+ "execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -525,33 +555,31 @@
},
{
"cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 7,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 8,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -571,37 +599,28 @@
},
{
"cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 8,
+ "metadata": {},
"outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "(pry):63: warning: key :height is duplicated and overwritten on line 66\n"
- ]
- },
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 10,
+ "execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@@ -620,37 +639,35 @@
},
{
"cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 9,
+ "metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
- "(pry):73: warning: key :height is duplicated and overwritten on line 79\n"
+ "(pry):61: warning: key :height is duplicated and overwritten on line 67\n"
]
},
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 12,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@@ -674,16 +691,14 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -691,7 +706,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Chart | Timeline.ipynb b/spec/dummy_iruby/Google Chart | Timeline.ipynb
index d6c9521..efa9d40 100644
--- a/spec/dummy_iruby/Google Chart | Timeline.ipynb
+++ b/spec/dummy_iruby/Google Chart | Timeline.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -355,9 +393,7 @@
{
"cell_type": "code",
"execution_count": 3,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -446,26 +482,24 @@
{
"cell_type": "code",
"execution_count": 4,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 4,
@@ -489,10 +523,8 @@
},
{
"cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 5,
+ "metadata": {},
"outputs": [
{
"data": {
@@ -500,7 +532,7 @@
"[\"George Washington\", \"John Adams\", \"Thomas Jefferson\"]"
]
},
- "execution_count": 6,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -511,10 +543,8 @@
},
{
"cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 6,
+ "metadata": {},
"outputs": [
{
"data": {
@@ -522,7 +552,7 @@
"[\"1\", \"2\", \"3\"]"
]
},
- "execution_count": 8,
+ "execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -533,10 +563,8 @@
},
{
"cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 7,
+ "metadata": {},
"outputs": [
{
"data": {
@@ -613,7 +641,7 @@
" 2 1801-02-04 1809-02-04 Thomas Jef 3"
]
},
- "execution_count": 9,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -624,10 +652,8 @@
},
{
"cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 8,
+ "metadata": {},
"outputs": [
{
"data": {
@@ -635,7 +661,7 @@
"[\"Term\", \"Name\", \"Start\", \"End\"]"
]
},
- "execution_count": 12,
+ "execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@@ -646,10 +672,8 @@
},
{
"cell_type": "code",
- "execution_count": 14,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 9,
+ "metadata": {},
"outputs": [
{
"data": {
@@ -726,7 +750,7 @@
" 2 3 Thomas Jef 1801-02-04 1809-02-04"
]
},
- "execution_count": 14,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@@ -737,30 +761,28 @@
},
{
"cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 10,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 13,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@@ -779,33 +801,31 @@
},
{
"cell_type": "code",
- "execution_count": 25,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 11,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 25,
+ "execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
@@ -837,30 +857,28 @@
},
{
"cell_type": "code",
- "execution_count": 26,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 12,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 26,
+ "execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
@@ -879,30 +897,28 @@
},
{
"cell_type": "code",
- "execution_count": 27,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 13,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 27,
+ "execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
@@ -914,30 +930,28 @@
},
{
"cell_type": "code",
- "execution_count": 28,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 14,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 28,
+ "execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
@@ -949,33 +963,31 @@
},
{
"cell_type": "code",
- "execution_count": 31,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 15,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 31,
+ "execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
@@ -997,30 +1009,28 @@
},
{
"cell_type": "code",
- "execution_count": 33,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 16,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 33,
+ "execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
@@ -1032,30 +1042,28 @@
},
{
"cell_type": "code",
- "execution_count": 35,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 17,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 35,
+ "execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
@@ -1074,33 +1082,31 @@
},
{
"cell_type": "code",
- "execution_count": 38,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 18,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 38,
+ "execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
@@ -1123,30 +1129,28 @@
},
{
"cell_type": "code",
- "execution_count": 40,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 19,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 40,
+ "execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
@@ -1158,30 +1162,28 @@
},
{
"cell_type": "code",
- "execution_count": 42,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 20,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 42,
+ "execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
@@ -1193,30 +1195,28 @@
},
{
"cell_type": "code",
- "execution_count": 43,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 21,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 43,
+ "execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
@@ -1233,30 +1233,28 @@
},
{
"cell_type": "code",
- "execution_count": 44,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 22,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 44,
+ "execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
@@ -1279,30 +1277,28 @@
},
{
"cell_type": "code",
- "execution_count": 47,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 23,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 47,
+ "execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
@@ -1327,30 +1323,28 @@
},
{
"cell_type": "code",
- "execution_count": 48,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 24,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 48,
+ "execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
@@ -1362,30 +1356,28 @@
},
{
"cell_type": "code",
- "execution_count": 52,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 25,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 52,
+ "execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
@@ -1410,33 +1402,31 @@
},
{
"cell_type": "code",
- "execution_count": 53,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 26,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 53,
+ "execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
@@ -1459,30 +1449,28 @@
},
{
"cell_type": "code",
- "execution_count": 55,
- "metadata": {
- "collapsed": false
- },
+ "execution_count": 27,
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
- "execution_count": 55,
+ "execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
@@ -1498,16 +1486,14 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -1515,7 +1501,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Chart | Treemap.ipynb b/spec/dummy_iruby/Google Chart | Treemap.ipynb
index a4ee6cb..8b86f69 100644
--- a/spec/dummy_iruby/Google Chart | Treemap.ipynb
+++ b/spec/dummy_iruby/Google Chart | Treemap.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -355,29 +393,27 @@
{
"cell_type": "code",
"execution_count": 3,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 3,
@@ -425,26 +461,24 @@
{
"cell_type": "code",
"execution_count": 4,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 4,
@@ -464,26 +498,24 @@
{
"cell_type": "code",
"execution_count": 5,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 5,
@@ -516,26 +548,24 @@
{
"cell_type": "code",
"execution_count": 6,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 6,
@@ -575,26 +605,24 @@
{
"cell_type": "code",
"execution_count": 7,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 7,
@@ -625,25 +653,21 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -651,7 +675,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Chart | gauge.ipynb b/spec/dummy_iruby/Google Chart | gauge.ipynb
index ea86adc..a2aaa57 100644
--- a/spec/dummy_iruby/Google Chart | gauge.ipynb
+++ b/spec/dummy_iruby/Google Chart | gauge.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -355,29 +393,27 @@
{
"cell_type": "code",
"execution_count": 3,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 3,
@@ -401,26 +437,24 @@
{
"cell_type": "code",
"execution_count": 4,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 4,
@@ -443,25 +477,21 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "Ruby 2.3.1",
+ "display_name": "Ruby 2.4.1",
"language": "ruby",
"name": "ruby"
},
@@ -469,7 +499,7 @@
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
- "version": "2.3.1"
+ "version": "2.4.1"
}
},
"nbformat": 4,
diff --git a/spec/dummy_iruby/Google Charts | Basics.ipynb b/spec/dummy_iruby/Google Charts | Basics.ipynb
index 8cdeefd..5d9379c 100644
--- a/spec/dummy_iruby/Google Charts | Basics.ipynb
+++ b/spec/dummy_iruby/Google Charts | Basics.ipynb
@@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stderr",
@@ -17,6 +15,48 @@
"Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n"
]
},
+ {
+ "data": {
+ "application/javascript": [
+ "if(window['d3'] === undefined ||\n",
+ " window['Nyaplot'] === undefined){\n",
+ " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n",
+ "\n",
+ "\n",
+ "\n",
+ " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n",
+ "\n",
+ " require.config({paths: path, shim:shim});\n",
+ "\n",
+ "\n",
+ "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n",
+ "\n",
+ "\tvar script = d3.select(\"head\")\n",
+ "\t .append(\"script\")\n",
+ "\t .attr(\"src\", \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n",
+ "\t .attr(\"async\", true);\n",
+ "\n",
+ "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n",
+ "\n",
+ "\n",
+ "\t var event = document.createEvent(\"HTMLEvents\");\n",
+ "\t event.initEvent(\"load_nyaplot\",false,false);\n",
+ "\t window.dispatchEvent(event);\n",
+ "\t console.log('Finished loading Nyaplotjs');\n",
+ "\n",
+ "\t};\n",
+ "\n",
+ "\n",
+ "});});\n",
+ "}\n"
+ ],
+ "text/plain": [
+ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/plain": [
@@ -35,9 +75,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -355,14 +393,12 @@
{
"cell_type": "code",
"execution_count": 3,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/plain": [
- "#, @listeners=[], @version=\"1.0\", @language=nil, @material=false, @options={}>>"
+ "#, @listeners=[], @version=\"1.0\", @language=nil, @material=false, @options={}>>"
]
},
"execution_count": 3,
@@ -377,9 +413,7 @@
{
"cell_type": "code",
"execution_count": 4,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -399,26 +433,24 @@
{
"cell_type": "code",
"execution_count": 5,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "\n",
+ "\n",
"\n"
],
"text/plain": [
- "\"\\n\\n\""
+ "\"\\n\\n\""
]
},
"execution_count": 5,
@@ -433,9 +465,7 @@
{
"cell_type": "code",
"execution_count": 6,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
@@ -799,14 +829,12 @@
{
"cell_type": "code",
"execution_count": 7,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"data": {
"text/plain": [
- "#\n",
+ "#\n",
" 0 1\n",
" 0 0 0\n",
" 1 1 10\n",
@@ -823,7 +851,7 @@
" 12 12 30\n",
" 13 13 40\n",
" 14 14 42\n",
- " ... ... ..., @options={}, @adapter=Daru::View::Adapter::GooglechartsAdapter, @chart=#\"number\", :label=>\"0\"}, {:type=>\"number\", :label=>\"1\"}], @rows=[[#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #]], @options={}>, @listeners=[], @version=\"1.0\", @language=nil, @material=false, @options={}>>"
+ " ... ... ..., @options={}, @adapter=Daru::View::Adapter::GooglechartsAdapter, @chart=#\"number\", :label=>\"0\"}, {:type=>\"number\", :label=>\"1\"}], @rows=[[#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #], [#, #