jsontochart 0.1.5 → 0.1.6
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.
- data/lib/jsontochart.rb +4 -3
- metadata +2 -2
data/lib/jsontochart.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
require 'json'
|
2
2
|
|
3
3
|
class JSONToChart
|
4
|
-
def initialize(file)
|
4
|
+
def initialize(file, id)
|
5
5
|
@input = file
|
6
|
+
@id = id
|
6
7
|
end
|
7
8
|
|
8
9
|
# Gets titles for columns and type of data then formats for table
|
@@ -115,14 +116,14 @@ class JSONToChart
|
|
115
116
|
function drawTable() {
|
116
117
|
var data = new google.visualization.DataTable();"
|
117
118
|
footerhtml = "var table = new
|
118
|
-
google.visualization.Table(document.getElementById('table_div'));
|
119
|
+
google.visualization.Table(document.getElementById('"+id+"table_div'));
|
119
120
|
table.draw(data, {showRowNumber: true});
|
120
121
|
}
|
121
122
|
</script>
|
122
123
|
</head>
|
123
124
|
|
124
125
|
<body>
|
125
|
-
<div id='table_div'></div>
|
126
|
+
<div id='"+id+"table_div'></div>
|
126
127
|
</body>
|
127
128
|
</html>"
|
128
129
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsontochart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-01-16 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Take JSON files and outputs html for various types of charts
|
15
15
|
email: shidash@shidash.com
|