nyaplot 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/examples/notebook/Interaction_with_DataFrame.ipynb +650 -572
- data/examples/notebook/Introduction.ipynb +475 -457
- data/examples/notebook/Mapnya.ipynb +372 -423
- data/lib/nyaplot/core.rb +4 -1
- data/lib/nyaplot/templates/iruby.erb +8 -1
- data/lib/nyaplot/version.rb +1 -1
- metadata +3 -2
data/lib/nyaplot/core.rb
CHANGED
|
@@ -2,7 +2,10 @@ require 'erb'
|
|
|
2
2
|
|
|
3
3
|
module Nyaplot
|
|
4
4
|
|
|
5
|
-
@@dep_libraries = {
|
|
5
|
+
@@dep_libraries = {
|
|
6
|
+
d3:'http://d3js.org/d3.v3.min',
|
|
7
|
+
downloadable: 'http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable'
|
|
8
|
+
}
|
|
6
9
|
@@additional_libraries = {}
|
|
7
10
|
@@extension_lists = []
|
|
8
11
|
|
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
(function(){
|
|
4
4
|
var render = function(){
|
|
5
5
|
var model = <%= model %>
|
|
6
|
-
|
|
6
|
+
var id_name = '#vis-<%= id %>';
|
|
7
|
+
Nyaplot.core.parse(model, id_name);
|
|
8
|
+
|
|
9
|
+
require(['downloadable'], function(downloadable){
|
|
10
|
+
var svg = d3.select(id_name).select("svg");
|
|
11
|
+
if(!svg.empty())
|
|
12
|
+
svg.call(downloadable().filename('fig'));
|
|
13
|
+
});
|
|
7
14
|
};
|
|
8
15
|
if(window['Nyaplot']==undefined){
|
|
9
16
|
window.addEventListener('load_nyaplot', render, false);
|
data/lib/nyaplot/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nyaplot
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Naoki Nishida
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-05-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -79,6 +79,7 @@ extensions: []
|
|
|
79
79
|
extra_rdoc_files: []
|
|
80
80
|
files:
|
|
81
81
|
- ".gitignore"
|
|
82
|
+
- ".gitmodules"
|
|
82
83
|
- ".rspec"
|
|
83
84
|
- ".travis.yml"
|
|
84
85
|
- Gemfile
|