graph_decorator 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/graph_decorator.gemspec +2 -2
- data/lib/graph_decorator.rb +36 -4
- data/lib/graph_decorator/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48ecbd0a108113c2994f8859456260b7334a8227
|
4
|
+
data.tar.gz: 799d902862950c8fb6e61644818ab98efb9461ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24c1cc32e363c3b7d2fce7bb6ce3128413d6332304da4265ebb4b879d3d21209dd9db8adf24dd0386eb2396dba2d3f45976b37b4b6c1a6a6b31efe9ad5551ff6
|
7
|
+
data.tar.gz: 2690a7f4c35c2c853b34e38f46831d5b25f3ddf64ba841beb0d35dd94bbe5c102ae5f29ba84f78e2d572d4cb63b4e55ba8e7787936e3b003c587a521a8225b65
|
data/graph_decorator.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Kishore Kumar"]
|
10
10
|
spec.email = ["x16103602@student.ncirl.ie"]
|
11
11
|
|
12
|
-
spec.summary = %q{
|
13
|
-
spec.description = %q{
|
12
|
+
spec.summary = %q{graph decorator makes use of pizza_chart to plot the graph.}
|
13
|
+
spec.description = %q{which is depending on lazy high charts with the help of pizza chart}
|
14
14
|
spec.license = "Nonstandard"
|
15
15
|
|
16
16
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
data/lib/graph_decorator.rb
CHANGED
@@ -1,19 +1,24 @@
|
|
1
1
|
require "graph_decorator/version"
|
2
2
|
require 'graph'
|
3
|
-
|
3
|
+
# This gem depends on the existing pizza chart gem to provide the graphical representation.
|
4
|
+
#This componenet class provides a basic structure of accepting the type of chart. That initialises to all types of chart requested by the user.
|
4
5
|
class BasicGraph
|
6
|
+
#initializes the object with type of chart passed from the application
|
5
7
|
def initialize(chartType)
|
6
8
|
@chartType = chartType
|
7
9
|
end
|
8
10
|
|
11
|
+
#returns charttype when called by decorator class
|
9
12
|
def singleChart
|
10
13
|
return @chartType
|
11
14
|
end
|
12
|
-
|
15
|
+
|
16
|
+
#returns charttype when called by decorator class
|
13
17
|
def doubleChart
|
14
18
|
return @chartType
|
15
19
|
end
|
16
20
|
|
21
|
+
#returns charttype when called by decorator class
|
17
22
|
def multipleChart
|
18
23
|
return @chartType
|
19
24
|
end
|
@@ -22,26 +27,31 @@ end
|
|
22
27
|
|
23
28
|
# decorator class -- this serves as the superclass for all the concrete decorators
|
24
29
|
class GraphDecoration
|
30
|
+
#initialises the decorator object declared in the appliation, which is the compnonent class object mostly in the paramters
|
25
31
|
def initialize(real_graph)
|
26
32
|
@real_graph = real_graph
|
27
33
|
end
|
28
|
-
|
34
|
+
|
35
|
+
#returns pizza chart gem function to build the graph with the data from its concrete decorator classes and from basic class with the data type of the chart
|
29
36
|
def singleChart
|
30
37
|
return Charting.singlechart(@x_name, @y_data_1, @y_name_1, @real_graph.singleChart)
|
31
38
|
end
|
32
39
|
|
40
|
+
#returns pizza chart gem function to build the graph with the data from its concrete decorator classes and from basic class with the data type of the chart
|
33
41
|
def doubleChart
|
34
42
|
return Charting.doublechart(@x_name, @y_data_1, @y_name_1, @y_data_2, @y_name_2, @real_graph.doubleChart)
|
35
43
|
end
|
36
44
|
|
45
|
+
#returns pizza chart gem function to build the graph with the data from its concrete decorator classes and from basic class with the data type of the chart
|
37
46
|
def multipleChart
|
38
47
|
return Charting.multichart(@x_name, @y_data_1, @y_name_1, @y_data_2, @y_name_2, @y_data_3, @y_name_3, @real_graph.multipleChart)
|
39
48
|
end
|
40
49
|
end
|
41
50
|
|
42
51
|
|
43
|
-
# a concrete decorator
|
52
|
+
# a concrete decorator provides the data for the super class decorator according to the requirement of single colum or double column or triple column.
|
44
53
|
class DSalesDecorator < GraphDecoration
|
54
|
+
#this functionality initialises with the data from the application models
|
45
55
|
def initialize(real_graph)
|
46
56
|
super(real_graph)
|
47
57
|
@y_name_1 = "Total Sale"
|
@@ -54,7 +64,9 @@ class DSalesDecorator < GraphDecoration
|
|
54
64
|
end
|
55
65
|
end
|
56
66
|
|
67
|
+
# a concrete decorator provides the data for the super class decorator according to the requirement of single colum or double column or triple column.
|
57
68
|
class DSaleOfferDecorator < GraphDecoration
|
69
|
+
#this functionality initialises with the data from the application models
|
58
70
|
def initialize(real_graph)
|
59
71
|
super(real_graph)
|
60
72
|
@y_name_1 = "Offered Sale"
|
@@ -67,7 +79,9 @@ class DSaleOfferDecorator < GraphDecoration
|
|
67
79
|
end
|
68
80
|
end
|
69
81
|
|
82
|
+
# a concrete decorator provides the data for the super class decorator according to the requirement of single colum or double column or triple column.
|
70
83
|
class DSaleTypeDecorator < GraphDecoration
|
84
|
+
#this functionality initialises with the data from the application models
|
71
85
|
def initialize(real_graph)
|
72
86
|
super(real_graph)
|
73
87
|
@y_name_1 = "Non Veg Sale"
|
@@ -80,7 +94,9 @@ class DSaleTypeDecorator < GraphDecoration
|
|
80
94
|
end
|
81
95
|
end
|
82
96
|
|
97
|
+
# a concrete decorator provides the data for the super class decorator according to the requirement of single colum or double column or triple column.
|
83
98
|
class WSalesDecorator < GraphDecoration
|
99
|
+
#this functionality initialises with the data from the application models
|
84
100
|
def initialize(real_graph)
|
85
101
|
super(real_graph)
|
86
102
|
@y_name_1 = "Total Sale"
|
@@ -93,7 +109,9 @@ class WSalesDecorator < GraphDecoration
|
|
93
109
|
end
|
94
110
|
end
|
95
111
|
|
112
|
+
# a concrete decorator provides the data for the super class decorator according to the requirement of single colum or double column or triple column.
|
96
113
|
class WSaleOfferDecorator < GraphDecoration
|
114
|
+
#this functionality initialises with the data from the application models
|
97
115
|
def initialize(real_graph)
|
98
116
|
super(real_graph)
|
99
117
|
@y_name_1 = "Offered Sale"
|
@@ -106,7 +124,9 @@ class WSaleOfferDecorator < GraphDecoration
|
|
106
124
|
end
|
107
125
|
end
|
108
126
|
|
127
|
+
# a concrete decorator provides the data for the super class decorator according to the requirement of single colum or double column or triple column.
|
109
128
|
class WSaleTypeDecorator < GraphDecoration
|
129
|
+
#this functionality initialises with the data from the application models
|
110
130
|
def initialize(real_graph)
|
111
131
|
super(real_graph)
|
112
132
|
@y_name_1 = "Non Veg Sale"
|
@@ -120,7 +140,9 @@ class WSaleTypeDecorator < GraphDecoration
|
|
120
140
|
end
|
121
141
|
|
122
142
|
|
143
|
+
# a concrete decorator provides the data for the super class decorator according to the requirement of single colum or double column or triple column.
|
123
144
|
class MSalesDecorator < GraphDecoration
|
145
|
+
#this functionality initialises with the data from the application models
|
124
146
|
def initialize(real_graph)
|
125
147
|
super(real_graph)
|
126
148
|
@y_name_1 = "Total Sale"
|
@@ -133,7 +155,9 @@ class MSalesDecorator < GraphDecoration
|
|
133
155
|
end
|
134
156
|
end
|
135
157
|
|
158
|
+
# a concrete decorator provides the data for the super class decorator according to the requirement of single colum or double column or triple column.
|
136
159
|
class MSaleOfferDecorator < GraphDecoration
|
160
|
+
#this functionality initialises with the data from the application models
|
137
161
|
def initialize(real_graph)
|
138
162
|
super(real_graph)
|
139
163
|
@y_name_1 = "Offered Sale"
|
@@ -146,7 +170,9 @@ class MSaleOfferDecorator < GraphDecoration
|
|
146
170
|
end
|
147
171
|
end
|
148
172
|
|
173
|
+
# a concrete decorator provides the data for the super class decorator according to the requirement of single colum or double column or triple column.
|
149
174
|
class MSaleTypeDecorator < GraphDecoration
|
175
|
+
#this functionality initialises with the data from the application models
|
150
176
|
def initialize(real_graph)
|
151
177
|
super(real_graph)
|
152
178
|
@y_name_1 = "Non Veg Sale"
|
@@ -159,8 +185,10 @@ class MSaleTypeDecorator < GraphDecoration
|
|
159
185
|
end
|
160
186
|
end
|
161
187
|
|
188
|
+
# a concrete decorator provides the data for the super class decorator according to the requirement of single colum or double column or triple column.
|
162
189
|
# another concrete decorator
|
163
190
|
class ProductDecorator < GraphDecoration
|
191
|
+
#this functionality initialises with the data from the application models
|
164
192
|
def initialize(real_graph)
|
165
193
|
super(real_graph)
|
166
194
|
@y_name_1 = "Actual Price"
|
@@ -173,7 +201,9 @@ class ProductDecorator < GraphDecoration
|
|
173
201
|
end
|
174
202
|
end
|
175
203
|
|
204
|
+
# a concrete decorator provides the data for the super class decorator according to the requirement of single colum or double column or triple column.
|
176
205
|
class ProductByHitDecorator < GraphDecoration
|
206
|
+
#this functionality initialises with the data from the application models
|
177
207
|
def initialize(real_graph)
|
178
208
|
super(real_graph)
|
179
209
|
@y_name_1 = "No. of sales"
|
@@ -186,7 +216,9 @@ class ProductByHitDecorator < GraphDecoration
|
|
186
216
|
end
|
187
217
|
end
|
188
218
|
|
219
|
+
# a concrete decorator provides the data for the super class decorator according to the requirement of single colum or double column or triple column.
|
189
220
|
class ReturningCustomers < GraphDecoration
|
221
|
+
#this functionality initialises with the data from the application models
|
190
222
|
def initialize(real_graph)
|
191
223
|
super(real_graph)
|
192
224
|
@y_name_1 = "New Cusomtomers"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graph_decorator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kishore Kumar
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 2.0.4
|
83
|
-
description:
|
83
|
+
description: which is depending on lazy high charts with the help of pizza chart
|
84
84
|
email:
|
85
85
|
- x16103602@student.ncirl.ie
|
86
86
|
executables: []
|
@@ -122,5 +122,5 @@ rubyforge_project:
|
|
122
122
|
rubygems_version: 2.5.1
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
|
-
summary:
|
125
|
+
summary: graph decorator makes use of pizza_chart to plot the graph.
|
126
126
|
test_files: []
|