ambling 0.0.1
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/.gitignore +4 -0
- data/Gemfile +4 -0
- data/MIT-LICENSE +20 -0
- data/README +188 -0
- data/Rakefile +24 -0
- data/ambling.gemspec +24 -0
- data/init.rb +4 -0
- data/lib/ambling.rb +10 -0
- data/lib/ambling/base.rb +69 -0
- data/lib/ambling/column.rb +1332 -0
- data/lib/ambling/data.rb +255 -0
- data/lib/ambling/line.rb +1822 -0
- data/lib/ambling/pie.rb +830 -0
- data/lib/ambling/railtie.rb +12 -0
- data/lib/ambling/stock.rb +1964 -0
- data/lib/ambling/utils.rb +120 -0
- data/lib/ambling/version.rb +3 -0
- data/lib/ambling/xy.rb +1511 -0
- data/lib/ambling_helper.rb +83 -0
- data/test/base_test.rb +54 -0
- data/test/data_test.rb +82 -0
- data/test/generator_test.rb +98 -0
- data/test/test_helper.rb +7 -0
- data/test/xmls/advanced_chart_data.xml +13 -0
- data/test/xmls/advanced_settings.xml +51 -0
- data/test/xmls/amcolumn_settings.xml +328 -0
- data/test/xmls/amline_settings.xml +402 -0
- data/test/xmls/ampie_settings.xml +195 -0
- data/test/xmls/amxy_settings.xml +335 -0
- data/test/xmls/simple.xml +17 -0
- data/test/xmls/simple_chart_data.xml +15 -0
- data/test/xmls/simple_pie_data.xml +5 -0
- data/test/xmls/simple_xy_data.xml +8 -0
- metadata +79 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rails'
|
2
|
+
require 'ambling_helper'
|
3
|
+
|
4
|
+
module Ambling
|
5
|
+
class Railtie < ::Rails::Railtie
|
6
|
+
ActiveSupport.on_load(:action_view) do
|
7
|
+
ActiveSupport.on_load(:after_initialize) do
|
8
|
+
ActionView::Base.send(:include, Ambling::Helper)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,1964 @@
|
|
1
|
+
# Auto generated from XML file
|
2
|
+
require 'ambling/base'
|
3
|
+
module Ambling
|
4
|
+
class Stock
|
5
|
+
|
6
|
+
#
|
7
|
+
# [10] (Number) the distance between the border and content (plot area, period selector, etc #
|
8
|
+
class Settings
|
9
|
+
include Base
|
10
|
+
|
11
|
+
VALUES = [:margins,:font,:text_size,:text_color,:redraw,:add_time_stamp,:max_series,:max_grid_count,:equal_spacing,:start_on_axis,:js_enabled,:interactive,:data_reloading,:number_format,:data_sets,:charts,:date_formats,:data_set_selector,:period_selector,:header,:balloon,:background,:plot_area,:scroller,:context_menu,:export_as_image,:strings,:error_messages]
|
12
|
+
#
|
13
|
+
# [Arial] (font name) use device fonts, such as Arial, Verdana, Time New Roman, etc #
|
14
|
+
attr_accessor :margins
|
15
|
+
|
16
|
+
#
|
17
|
+
# [11] (Number) #
|
18
|
+
attr_accessor :font
|
19
|
+
|
20
|
+
#
|
21
|
+
# [#000000] (hex code) #
|
22
|
+
attr_accessor :text_size
|
23
|
+
|
24
|
+
#
|
25
|
+
# [false] (true / false) if your chart's width or height is set in percents, and redraw is set
|
26
|
+
# to true, the chart will fit then screen when resizing it #
|
27
|
+
attr_accessor :text_color
|
28
|
+
|
29
|
+
#
|
30
|
+
# [false] (true / false) if set to true, a unique timestamp will be added to data file name
|
31
|
+
# everytime when loading data. This helps to avoid data caching #
|
32
|
+
attr_accessor :redraw
|
33
|
+
|
34
|
+
#
|
35
|
+
# [150] (Number) The maximum number of series. If in the selected period there are more series
|
36
|
+
# then is set here, the chart will show data for a longer period - week, month, year. You can
|
37
|
+
# specify which value of the period should be used separately for every graph (look for
|
38
|
+
# <period_value>) in graph's settings. If you want to show all series, set 0. Using a lot of series
|
39
|
+
# will slow down scrolling and other interactivity #
|
40
|
+
attr_accessor :add_time_stamp
|
41
|
+
|
42
|
+
#
|
43
|
+
# [8] (Number) The maximum number of vertical grid lines and x axis values. The wider your
|
44
|
+
# chart is, the bigger number can be set here. If you set too big number, the x axis values may
|
45
|
+
# overlap. #
|
46
|
+
attr_accessor :max_series
|
47
|
+
|
48
|
+
#
|
49
|
+
# [true] (true / false) If this setting is set to true, series will be placed next to each
|
50
|
+
# other at equal intervals, even your data is not periodical. If you values are at irregular
|
51
|
+
# intervals and you want this to be visualized on the chart, set this setting to false #
|
52
|
+
attr_accessor :max_grid_count
|
53
|
+
|
54
|
+
#
|
55
|
+
# [true] (true / false) In case <equal_spacing> is set to true, and one of your graph's type is
|
56
|
+
# "column", then you might want first and last columns to be fully visible. Then set this setting to
|
57
|
+
# "false". Otherwise only half of first and last column will be visible #
|
58
|
+
attr_accessor :equal_spacing
|
59
|
+
|
60
|
+
#
|
61
|
+
# [true] (true / false) In case you don't use any flash - JavaScript communication, you shuold
|
62
|
+
# set this setting to false - this will save some CPU. #
|
63
|
+
attr_accessor :start_on_axis
|
64
|
+
|
65
|
+
#
|
66
|
+
# [true] (true / false) In case you don't want the chart to be interactive, set this to false #
|
67
|
+
attr_accessor :js_enabled
|
68
|
+
|
69
|
+
#
|
70
|
+
#
|
71
|
+
attr_accessor :interactive
|
72
|
+
|
73
|
+
#
|
74
|
+
# [0] (Number) In case you want chart's data to be reloaded at some interval, set number
|
75
|
+
# bigger then 0 here. Data will be reloaded every x seconds. Note, you can also trigger data
|
76
|
+
# reload using javascript function #
|
77
|
+
attr_accessor :data_reloading
|
78
|
+
|
79
|
+
#
|
80
|
+
# [,] (separator) #
|
81
|
+
attr_accessor :number_format
|
82
|
+
|
83
|
+
#
|
84
|
+
# start of data set settings #
|
85
|
+
attr_accessor :data_sets
|
86
|
+
|
87
|
+
#
|
88
|
+
# first chart#
|
89
|
+
attr_accessor :charts
|
90
|
+
|
91
|
+
#
|
92
|
+
# [24] (12 / 24) The time in the legend and x axis might be displayed using 12 or 24 hour format #
|
93
|
+
attr_accessor :date_formats
|
94
|
+
|
95
|
+
#
|
96
|
+
# [true] (true / false) whether to show data set selector or not #
|
97
|
+
attr_accessor :data_set_selector
|
98
|
+
|
99
|
+
#
|
100
|
+
# [true] (true / false) whether to show period selector or not #
|
101
|
+
attr_accessor :period_selector
|
102
|
+
|
103
|
+
#
|
104
|
+
# [true] (true / false) #
|
105
|
+
attr_accessor :header
|
106
|
+
|
107
|
+
#
|
108
|
+
# [#FFFFFF] (hex code) #
|
109
|
+
attr_accessor :balloon
|
110
|
+
|
111
|
+
#
|
112
|
+
# [#FFFFFF] (hex code) #
|
113
|
+
attr_accessor :background
|
114
|
+
|
115
|
+
#
|
116
|
+
# [0] (Number) #
|
117
|
+
attr_accessor :plot_area
|
118
|
+
|
119
|
+
#
|
120
|
+
# [true] (true / false) #
|
121
|
+
attr_accessor :scroller
|
122
|
+
|
123
|
+
#
|
124
|
+
# "function_name" specifies JavaScript function which will be called when user clicks on
|
125
|
+
# this menu. You can pass variables, for example: function_name="alert('something')".
|
126
|
+
# "title" sets menu item text. Do not use for title: Show all, Zoom in, Zoom out, Print, Settings...
|
127
|
+
# You can have any number of custom menus. Uncomment the line below to enable this menu and add
|
128
|
+
# apropriate JS function to your html file. #
|
129
|
+
attr_accessor :context_menu
|
130
|
+
|
131
|
+
#
|
132
|
+
# [] (filename) if you set filename here, context menu (then user right clicks on flash movie)
|
133
|
+
# "Export as image" will appear. This will allow user to export chart as an image. Collected image
|
134
|
+
# data will be posted to this file name (use amstock/export.php or amstock/export.aspx) #
|
135
|
+
attr_accessor :export_as_image
|
136
|
+
|
137
|
+
#
|
138
|
+
# [Processing data] (text) #
|
139
|
+
attr_accessor :strings
|
140
|
+
|
141
|
+
#
|
142
|
+
# [true] (true / false) #
|
143
|
+
attr_accessor :error_messages
|
144
|
+
|
145
|
+
|
146
|
+
#
|
147
|
+
# [0] (Number) In case you want chart's data to be reloaded at some interval, set number
|
148
|
+
# bigger then 0 here. Data will be reloaded every x seconds. Note, you can also trigger data
|
149
|
+
# reload using javascript function #
|
150
|
+
class DataReloading
|
151
|
+
include Base
|
152
|
+
|
153
|
+
VALUES = [:interval,:show_preloader,:reset_period]
|
154
|
+
#
|
155
|
+
# [true] (true / false) if set to true, preloader and "processing data" text will be
|
156
|
+
# displayed while reloading and processing data #
|
157
|
+
attr_accessor :interval
|
158
|
+
|
159
|
+
#
|
160
|
+
# [false] (true / false) if set to true, after every reload default time period (defined in
|
161
|
+
# <period_selector>) will be selected. Otherwise currently selected period will remain. #
|
162
|
+
attr_accessor :show_preloader
|
163
|
+
|
164
|
+
#
|
165
|
+
#
|
166
|
+
attr_accessor :reset_period
|
167
|
+
end
|
168
|
+
#
|
169
|
+
# [,] (separator) #
|
170
|
+
class NumberFormat
|
171
|
+
include Base
|
172
|
+
|
173
|
+
VALUES = [:decimal_separator,:thousand_separator,:digits_after_decimal,:letters]
|
174
|
+
#
|
175
|
+
# [ ] (separator) use "none" if you don't want thousands to be separated #
|
176
|
+
attr_accessor :decimal_separator
|
177
|
+
|
178
|
+
#
|
179
|
+
# defines how many numbers should be left after comma #
|
180
|
+
attr_accessor :thousand_separator
|
181
|
+
|
182
|
+
#
|
183
|
+
# [2] (Number) the number of digits after decimal for percent values #
|
184
|
+
attr_accessor :digits_after_decimal
|
185
|
+
|
186
|
+
#
|
187
|
+
#
|
188
|
+
attr_accessor :letters
|
189
|
+
|
190
|
+
|
191
|
+
#
|
192
|
+
# [2] (Number) the number of digits after decimal for percent values #
|
193
|
+
class DigitsAfterDecimal
|
194
|
+
include Base
|
195
|
+
|
196
|
+
VALUES = [:percents,:data,:averages]
|
197
|
+
#
|
198
|
+
# [] (Number) number of digits after decimal for values from data file. In case you don't
|
199
|
+
# set any number here (this is default) then values from data file will not be rounded #
|
200
|
+
attr_accessor :percents
|
201
|
+
|
202
|
+
#
|
203
|
+
# [2] (Number) Then the number of series in the selected period exceeds <max_series>, you
|
204
|
+
# can show averages of the period. This setting sets the number of decimals for averages #
|
205
|
+
attr_accessor :data
|
206
|
+
|
207
|
+
#
|
208
|
+
#
|
209
|
+
attr_accessor :averages
|
210
|
+
end
|
211
|
+
#
|
212
|
+
#
|
213
|
+
class Letters
|
214
|
+
include Base
|
215
|
+
|
216
|
+
VALUES = [:letter]
|
217
|
+
#
|
218
|
+
#
|
219
|
+
attr_accessor :letter
|
220
|
+
end
|
221
|
+
end
|
222
|
+
#
|
223
|
+
# start of data set settings #
|
224
|
+
class DataSets
|
225
|
+
include Base
|
226
|
+
|
227
|
+
VALUES = [:data_set]
|
228
|
+
#
|
229
|
+
# [] (text) data set title is displayed in a drop down for selecting data set, in a
|
230
|
+
# list box for comparing one data set with another and may be displayed in a chart's header #
|
231
|
+
attr_accessor :data_set
|
232
|
+
|
233
|
+
|
234
|
+
#
|
235
|
+
# [] (text) data set title is displayed in a drop down for selecting data set, in a
|
236
|
+
# list box for comparing one data set with another and may be displayed in a chart's header #
|
237
|
+
class DataSet
|
238
|
+
include Base
|
239
|
+
|
240
|
+
VALUES = [:title,:short,:color,:description,:file_name,:events_file_name,:main_drop_down,:compare_list_box,:csv,:events]
|
241
|
+
ATTRIBUTES = [:did]
|
242
|
+
#
|
243
|
+
# [] (text) short title can be displayed in the legend of a chart #
|
244
|
+
attr_accessor :title
|
245
|
+
|
246
|
+
#
|
247
|
+
# [] (hex code) this color will be used for chart's graphs, in case you don't set different
|
248
|
+
# color in graphs' settings. The color keys in the drop down, list box and in the legend will
|
249
|
+
# use this color. In case you don't set any color here, the colors from this array will be used:
|
250
|
+
# #ff3300,#3366cc,#00cc33,#ffcc00,#ff0099,#003366,#669933,#cc99cc,#333333,#99ff00,[random color] #
|
251
|
+
attr_accessor :short
|
252
|
+
|
253
|
+
#
|
254
|
+
# [] (text) description can be displayed in chart's header. you can use some html tags #
|
255
|
+
attr_accessor :color
|
256
|
+
|
257
|
+
#
|
258
|
+
# [] (file name) file name of your data file. You can use any extension, generate this
|
259
|
+
# data dynamicaly. The output of this file should be data in CSV format #
|
260
|
+
attr_accessor :description
|
261
|
+
|
262
|
+
#
|
263
|
+
# [] (file name) Using events you can have custom bullets with descriptions on your charts.
|
264
|
+
# Event properties are defined separately for every chart. Check examples/events/ example.
|
265
|
+
# You can also include the events directly to this settings file. If you do this, the events
|
266
|
+
# from the file will not be loaded. #
|
267
|
+
attr_accessor :file_name
|
268
|
+
|
269
|
+
#
|
270
|
+
# [true] (true / false) if you have more then one data set, the user can switch between
|
271
|
+
# them using drop down for selecting data sets. If you don;t want this data set to appear in
|
272
|
+
# this dropdown, set this setting to "false". "selected" attribute defines whether you want
|
273
|
+
# this data set to be selected when the chart is loaded (if no data sets are selected, then
|
274
|
+
# the first data set will be) #
|
275
|
+
attr_accessor :events_file_name
|
276
|
+
|
277
|
+
#
|
278
|
+
# [true] (true / false) if you have more then one data set, the user can compare selected
|
279
|
+
# data set with others. If you don't want this data set to appear in a "compare" list box, set
|
280
|
+
# this setting to false. "selected" attribute defines whether you want this data set to be
|
281
|
+
# selected for comparing when the chart is loaded #
|
282
|
+
attr_accessor :main_drop_down
|
283
|
+
|
284
|
+
#
|
285
|
+
# configuration of data csv file. Using these settings you can make the chart to accept
|
286
|
+
# almost any configuration of csv file #
|
287
|
+
attr_accessor :compare_list_box
|
288
|
+
|
289
|
+
#
|
290
|
+
# [false] (true / false) If this is set to false, then the oldest date should be on the
|
291
|
+
# top and increase when going down. If you newest date is on the top, set this to "false" #
|
292
|
+
attr_accessor :csv
|
293
|
+
|
294
|
+
#
|
295
|
+
#
|
296
|
+
attr_accessor :events
|
297
|
+
|
298
|
+
#
|
299
|
+
# xml attribute
|
300
|
+
#
|
301
|
+
attr_accessor :did
|
302
|
+
|
303
|
+
|
304
|
+
#
|
305
|
+
# [false] (true / false) If this is set to false, then the oldest date should be on the
|
306
|
+
# top and increase when going down. If you newest date is on the top, set this to "false" #
|
307
|
+
class Csv
|
308
|
+
include Base
|
309
|
+
|
310
|
+
VALUES = [:reverse,:separator,:skip_first_rows,:skip_last_rows,:show_last_rows,:date_format,:decimal_separator,:columns,:data]
|
311
|
+
#
|
312
|
+
# [;] (separator) Column separator of csv file #
|
313
|
+
attr_accessor :reverse
|
314
|
+
|
315
|
+
#
|
316
|
+
# [0] (Number) In case you have some header in your csv file, or you have some rows
|
317
|
+
# which shouldn't be included, you can set how many rows should be skipped #
|
318
|
+
attr_accessor :separator
|
319
|
+
|
320
|
+
#
|
321
|
+
# [0] (Number) You can set how many rows from the bottom of data csv should be skipped #
|
322
|
+
attr_accessor :skip_first_rows
|
323
|
+
|
324
|
+
#
|
325
|
+
# [] (Number) You can set the number of rows, counting from the bottom of the data csv
|
326
|
+
# should be used for your data#
|
327
|
+
attr_accessor :skip_last_rows
|
328
|
+
|
329
|
+
#
|
330
|
+
# [YYYY-MM-DD] (date format) The valid symbols are: YYYY, MM, DD, hh, mm, ss. Any order
|
331
|
+
# and separators can be used, for example: DD-MM-YYYY, YYYY-MM, YYYY-DD-MM hh,
|
332
|
+
# DD-MM-YY hh:mm:ss, etc #
|
333
|
+
attr_accessor :show_last_rows
|
334
|
+
|
335
|
+
#
|
336
|
+
# [.] (separator) Decimal separator in your csv file #
|
337
|
+
attr_accessor :date_format
|
338
|
+
|
339
|
+
#
|
340
|
+
# columns define columns of your data file. There should be at least two columns, and
|
341
|
+
# one of them should be defined as "date". For simple line chart it will be enough to have
|
342
|
+
# these two columns, for a candlestick chart you should have 5 columns (date, open, close,
|
343
|
+
# high, low) Any names can be used (only "date" column name can't be different) #
|
344
|
+
attr_accessor :decimal_separator
|
345
|
+
|
346
|
+
#
|
347
|
+
#
|
348
|
+
attr_accessor :columns
|
349
|
+
|
350
|
+
#
|
351
|
+
#
|
352
|
+
attr_accessor :data
|
353
|
+
|
354
|
+
|
355
|
+
#
|
356
|
+
#
|
357
|
+
class Columns
|
358
|
+
include Base
|
359
|
+
|
360
|
+
VALUES = [:column]
|
361
|
+
#
|
362
|
+
#
|
363
|
+
attr_accessor :column
|
364
|
+
end
|
365
|
+
end
|
366
|
+
end
|
367
|
+
end
|
368
|
+
#
|
369
|
+
# first chart#
|
370
|
+
class Charts
|
371
|
+
include Base
|
372
|
+
|
373
|
+
VALUES = [:chart]
|
374
|
+
#
|
375
|
+
# [] (Number) the relative height of your chart. If you have one chart, it will take 100% of
|
376
|
+
# plot area. If you do not set any number, the space for your charts will be divided equally #
|
377
|
+
attr_accessor :chart
|
378
|
+
|
379
|
+
|
380
|
+
#
|
381
|
+
# [] (Number) the relative height of your chart. If you have one chart, it will take 100% of
|
382
|
+
# plot area. If you do not set any number, the space for your charts will be divided equally #
|
383
|
+
class Chart
|
384
|
+
include Base
|
385
|
+
|
386
|
+
VALUES = [:height,:title,:bg_color,:bg_alpha,:border_color,:border_alpha,:grid,:values,:legend,:comparing,:events,:column_width,:graphs]
|
387
|
+
ATTRIBUTES = [:cid]
|
388
|
+
#
|
389
|
+
# [] (text) chart's title is displayed above your chart, in the left #
|
390
|
+
attr_accessor :height
|
391
|
+
|
392
|
+
#
|
393
|
+
# [#FFFFFF] (hex code) Chart background color. Separate color codes with commas if you want
|
394
|
+
# to have gradient background#
|
395
|
+
attr_accessor :title
|
396
|
+
|
397
|
+
#
|
398
|
+
# [100] (0 - 100) background opacity #
|
399
|
+
attr_accessor :bg_color
|
400
|
+
|
401
|
+
#
|
402
|
+
# [#CCCCCC] (hex code) Chart border color #
|
403
|
+
attr_accessor :bg_alpha
|
404
|
+
|
405
|
+
#
|
406
|
+
# [100] (0 - 100) border opacity #
|
407
|
+
attr_accessor :border_color
|
408
|
+
|
409
|
+
#
|
410
|
+
# GRID #
|
411
|
+
attr_accessor :border_alpha
|
412
|
+
|
413
|
+
#
|
414
|
+
#
|
415
|
+
attr_accessor :grid
|
416
|
+
|
417
|
+
#
|
418
|
+
#
|
419
|
+
attr_accessor :values
|
420
|
+
|
421
|
+
#
|
422
|
+
# [true] (true / false) whether to show legend or not #
|
423
|
+
attr_accessor :legend
|
424
|
+
|
425
|
+
#
|
426
|
+
# [true] (true / false) in stock charts, when comparing one stock with another it is used
|
427
|
+
# to recalculate chart values to percents, as the difference between values of different
|
428
|
+
# stocks can be very big. However, if you compare close values, for example unique visitors
|
429
|
+
# with new visitors, it would be better not to recalculate values #
|
430
|
+
attr_accessor :comparing
|
431
|
+
|
432
|
+
#
|
433
|
+
# [true] (true / false) Whether to show balloon with description on roll-over the flag or not. #
|
434
|
+
attr_accessor :events
|
435
|
+
|
436
|
+
#
|
437
|
+
# GRAPHS. One chart can have a lot of graphs #
|
438
|
+
attr_accessor :column_width
|
439
|
+
|
440
|
+
#
|
441
|
+
# first graph #
|
442
|
+
attr_accessor :graphs
|
443
|
+
|
444
|
+
#
|
445
|
+
# xml attribute
|
446
|
+
#
|
447
|
+
attr_accessor :cid
|
448
|
+
|
449
|
+
|
450
|
+
#
|
451
|
+
#
|
452
|
+
class Grid
|
453
|
+
include Base
|
454
|
+
|
455
|
+
VALUES = [:x,:y_left,:y_right]
|
456
|
+
#
|
457
|
+
# [true] (true / false) whether to show vertical grid or not #
|
458
|
+
attr_accessor :x
|
459
|
+
|
460
|
+
#
|
461
|
+
# [true] (true / false) whether to show grid on this axis or not. Grid will be shown
|
462
|
+
# only if at least one graph is assigned to this axis #
|
463
|
+
attr_accessor :y_left
|
464
|
+
|
465
|
+
#
|
466
|
+
#
|
467
|
+
attr_accessor :y_right
|
468
|
+
|
469
|
+
|
470
|
+
#
|
471
|
+
# [true] (true / false) whether to show vertical grid or not #
|
472
|
+
class X
|
473
|
+
include Base
|
474
|
+
|
475
|
+
VALUES = [:enabled,:color,:alpha,:dashed,:dash_length]
|
476
|
+
#
|
477
|
+
# [#000000] (hex code) vertical grid color #
|
478
|
+
attr_accessor :enabled
|
479
|
+
|
480
|
+
#
|
481
|
+
# [15] (0 - 100) vertical grid opacity #
|
482
|
+
attr_accessor :color
|
483
|
+
|
484
|
+
#
|
485
|
+
# [false] (true / false) note, dashed lines affects performance #
|
486
|
+
attr_accessor :alpha
|
487
|
+
|
488
|
+
#
|
489
|
+
# [5] (Number) #
|
490
|
+
attr_accessor :dashed
|
491
|
+
|
492
|
+
#
|
493
|
+
#
|
494
|
+
attr_accessor :dash_length
|
495
|
+
end
|
496
|
+
#
|
497
|
+
# [true] (true / false) whether to show grid on this axis or not. Grid will be shown
|
498
|
+
# only if at least one graph is assigned to this axis #
|
499
|
+
class YLeft
|
500
|
+
include Base
|
501
|
+
|
502
|
+
VALUES = [:enabled,:color,:alpha,:dashed,:dash_length,:approx_count,:fill_color,:fill_alpha]
|
503
|
+
#
|
504
|
+
# [#000000] (hex code) grid color #
|
505
|
+
attr_accessor :enabled
|
506
|
+
|
507
|
+
#
|
508
|
+
# [15] (0 - 100) grid opacity #
|
509
|
+
attr_accessor :color
|
510
|
+
|
511
|
+
#
|
512
|
+
# [false] (true / false) note, dashed lines affects performance #
|
513
|
+
attr_accessor :alpha
|
514
|
+
|
515
|
+
#
|
516
|
+
# [5] (Number) #
|
517
|
+
attr_accessor :dashed
|
518
|
+
|
519
|
+
#
|
520
|
+
# [5] (Number) Approximate number of grid lines #
|
521
|
+
attr_accessor :dash_length
|
522
|
+
|
523
|
+
#
|
524
|
+
# [#FFFFFF] (hex code) Every second area between grid lines will be filled with this color (remember to set fill_alpha > 0) #
|
525
|
+
attr_accessor :approx_count
|
526
|
+
|
527
|
+
#
|
528
|
+
# [0] (0 - 100) opacity of fill #
|
529
|
+
attr_accessor :fill_color
|
530
|
+
|
531
|
+
#
|
532
|
+
#
|
533
|
+
attr_accessor :fill_alpha
|
534
|
+
end
|
535
|
+
#
|
536
|
+
#
|
537
|
+
class YRight
|
538
|
+
include Base
|
539
|
+
|
540
|
+
VALUES = [:enabled,:color,:alpha,:dashed,:dash_length,:approx_count,:fill_color,:fill_alpha]
|
541
|
+
#
|
542
|
+
#
|
543
|
+
attr_accessor :enabled
|
544
|
+
|
545
|
+
#
|
546
|
+
#
|
547
|
+
attr_accessor :color
|
548
|
+
|
549
|
+
#
|
550
|
+
#
|
551
|
+
attr_accessor :alpha
|
552
|
+
|
553
|
+
#
|
554
|
+
#
|
555
|
+
attr_accessor :dashed
|
556
|
+
|
557
|
+
#
|
558
|
+
#
|
559
|
+
attr_accessor :dash_length
|
560
|
+
|
561
|
+
#
|
562
|
+
#
|
563
|
+
attr_accessor :approx_count
|
564
|
+
|
565
|
+
#
|
566
|
+
#
|
567
|
+
attr_accessor :fill_color
|
568
|
+
|
569
|
+
#
|
570
|
+
#
|
571
|
+
attr_accessor :fill_alpha
|
572
|
+
end
|
573
|
+
end
|
574
|
+
#
|
575
|
+
#
|
576
|
+
class Values
|
577
|
+
include Base
|
578
|
+
|
579
|
+
VALUES = [:x,:y_left,:y_right]
|
580
|
+
#
|
581
|
+
# [true] (true / false) whether to display x axis values. If you have more then one
|
582
|
+
# chart, it would be wise to enable x axis values for one chart only #
|
583
|
+
attr_accessor :x
|
584
|
+
|
585
|
+
#
|
586
|
+
# [true] (true / false) whether to show values on this axis or not. Values will be
|
587
|
+
# shown only if at least one graph is assigned to this axis #
|
588
|
+
attr_accessor :y_left
|
589
|
+
|
590
|
+
#
|
591
|
+
#
|
592
|
+
attr_accessor :y_right
|
593
|
+
|
594
|
+
|
595
|
+
#
|
596
|
+
# [true] (true / false) whether to display x axis values. If you have more then one
|
597
|
+
# chart, it would be wise to enable x axis values for one chart only #
|
598
|
+
class X
|
599
|
+
include Base
|
600
|
+
|
601
|
+
VALUES = [:enabled,:text_color,:text_size,:bg_color,:bg_alpha]
|
602
|
+
#
|
603
|
+
# [text_color] (hex code) #
|
604
|
+
attr_accessor :enabled
|
605
|
+
|
606
|
+
#
|
607
|
+
# [text_size] (hex code) #
|
608
|
+
attr_accessor :text_color
|
609
|
+
|
610
|
+
#
|
611
|
+
# [#FFFFFF] (hex code) x axis values background color #
|
612
|
+
attr_accessor :text_size
|
613
|
+
|
614
|
+
#
|
615
|
+
# [100] (0 - 100) x axis values background opacity #
|
616
|
+
attr_accessor :bg_color
|
617
|
+
|
618
|
+
#
|
619
|
+
#
|
620
|
+
attr_accessor :bg_alpha
|
621
|
+
end
|
622
|
+
#
|
623
|
+
# [true] (true / false) whether to show values on this axis or not. Values will be
|
624
|
+
# shown only if at least one graph is assigned to this axis #
|
625
|
+
class YLeft
|
626
|
+
include Base
|
627
|
+
|
628
|
+
VALUES = [:enabled,:min,:max,:integers_only,:text_color,:text_size,:bg_color,:bg_alpha,:unit,:unit_position,:digits_after_decimal]
|
629
|
+
#
|
630
|
+
# [] (Number / min) If you do not set any number here, the min value will be calculated
|
631
|
+
# automatically. In case you set some value here, but the actual min value will be less,
|
632
|
+
# then this setting will be ignored. If you want to avoid "jumping" while dragging the chart,
|
633
|
+
# you can set "min" here, then the min value will be calculated using all the data, not only
|
634
|
+
# the selected period. #
|
635
|
+
attr_accessor :enabled
|
636
|
+
|
637
|
+
#
|
638
|
+
# [] (Number / min) If you do not set any number here, the max value will be calculated
|
639
|
+
# automatically. In case you set some value here, but the actual max value will be bigger,
|
640
|
+
# then this setting will be ignored. If you want to avoid "jumping" while dragging the chart,
|
641
|
+
# you can set "max" here, then the max value will be calculated using all the data, not only
|
642
|
+
# the selected period. #
|
643
|
+
attr_accessor :min
|
644
|
+
|
645
|
+
#
|
646
|
+
# [false] (true / false) Set this to true, if you don't want values with decimals to be
|
647
|
+
# shown#
|
648
|
+
attr_accessor :max
|
649
|
+
|
650
|
+
#
|
651
|
+
# [text_color] (hex code) #
|
652
|
+
attr_accessor :integers_only
|
653
|
+
|
654
|
+
#
|
655
|
+
# [text_size] (Number) #
|
656
|
+
attr_accessor :text_color
|
657
|
+
|
658
|
+
#
|
659
|
+
# [#FFFFFF] (hex code) background color of a value #
|
660
|
+
attr_accessor :text_size
|
661
|
+
|
662
|
+
#
|
663
|
+
# [0] (0 - 100) background opacity #
|
664
|
+
attr_accessor :bg_color
|
665
|
+
|
666
|
+
#
|
667
|
+
# [] (text) unit which will be added to values on y axis#
|
668
|
+
attr_accessor :bg_alpha
|
669
|
+
|
670
|
+
#
|
671
|
+
# [right] (left / right) #
|
672
|
+
attr_accessor :unit
|
673
|
+
|
674
|
+
#
|
675
|
+
# defines how many numbers should be displayed after comma #
|
676
|
+
attr_accessor :unit_position
|
677
|
+
|
678
|
+
#
|
679
|
+
# [number_format.digits_after_decimal.data] (Number) number of digits after decimal #
|
680
|
+
attr_accessor :digits_after_decimal
|
681
|
+
|
682
|
+
|
683
|
+
#
|
684
|
+
# [number_format.digits_after_decimal.data] (Number) number of digits after decimal #
|
685
|
+
class DigitsAfterDecimal
|
686
|
+
include Base
|
687
|
+
|
688
|
+
VALUES = [:data,:percents]
|
689
|
+
#
|
690
|
+
# [number_format.digits_after_decimal.percents] (Number) the number of digits after
|
691
|
+
# decimal when the values are recalculated to percents #
|
692
|
+
attr_accessor :data
|
693
|
+
|
694
|
+
#
|
695
|
+
#
|
696
|
+
attr_accessor :percents
|
697
|
+
end
|
698
|
+
end
|
699
|
+
#
|
700
|
+
#
|
701
|
+
class YRight
|
702
|
+
include Base
|
703
|
+
|
704
|
+
VALUES = [:enabled,:min,:max,:integers_only,:text_color,:text_size,:bg_color,:bg_alpha,:unit,:unit_position,:digits_after_decimal]
|
705
|
+
#
|
706
|
+
#
|
707
|
+
attr_accessor :enabled
|
708
|
+
|
709
|
+
#
|
710
|
+
#
|
711
|
+
attr_accessor :min
|
712
|
+
|
713
|
+
#
|
714
|
+
#
|
715
|
+
attr_accessor :max
|
716
|
+
|
717
|
+
#
|
718
|
+
#
|
719
|
+
attr_accessor :integers_only
|
720
|
+
|
721
|
+
#
|
722
|
+
#
|
723
|
+
attr_accessor :text_color
|
724
|
+
|
725
|
+
#
|
726
|
+
#
|
727
|
+
attr_accessor :text_size
|
728
|
+
|
729
|
+
#
|
730
|
+
#
|
731
|
+
attr_accessor :bg_color
|
732
|
+
|
733
|
+
#
|
734
|
+
#
|
735
|
+
attr_accessor :bg_alpha
|
736
|
+
|
737
|
+
#
|
738
|
+
#
|
739
|
+
attr_accessor :unit
|
740
|
+
|
741
|
+
#
|
742
|
+
#
|
743
|
+
attr_accessor :unit_position
|
744
|
+
|
745
|
+
#
|
746
|
+
#
|
747
|
+
attr_accessor :digits_after_decimal
|
748
|
+
|
749
|
+
|
750
|
+
#
|
751
|
+
#
|
752
|
+
class DigitsAfterDecimal
|
753
|
+
include Base
|
754
|
+
|
755
|
+
VALUES = [:data,:percents]
|
756
|
+
#
|
757
|
+
#
|
758
|
+
attr_accessor :data
|
759
|
+
|
760
|
+
#
|
761
|
+
#
|
762
|
+
attr_accessor :percents
|
763
|
+
end
|
764
|
+
end
|
765
|
+
end
|
766
|
+
#
|
767
|
+
# [true] (true / false) whether to show legend or not #
|
768
|
+
class Legend
|
769
|
+
include Base
|
770
|
+
|
771
|
+
VALUES = [:enabled,:text_size,:text_color,:value_color,:positive_color,:negative_color,:show_date,:hide_date_on_period,:key_size,:key_type,:graph_on_off]
|
772
|
+
#
|
773
|
+
# [text_size] (Number) #
|
774
|
+
attr_accessor :enabled
|
775
|
+
|
776
|
+
#
|
777
|
+
# [text_color] (hex code) #
|
778
|
+
attr_accessor :text_size
|
779
|
+
|
780
|
+
#
|
781
|
+
# [legend.text_color] (hex code) Values in the legend can use different color #
|
782
|
+
attr_accessor :text_color
|
783
|
+
|
784
|
+
#
|
785
|
+
# [#00CC00] (hex code) If percent change or value change is displayed in the legend, and
|
786
|
+
# the change is positive this color will be used #
|
787
|
+
attr_accessor :value_color
|
788
|
+
|
789
|
+
#
|
790
|
+
# [#CC0000] (hex code) If percent change or value change is displayed in the legend, and
|
791
|
+
# the change is negative this color will be used #
|
792
|
+
attr_accessor :positive_color
|
793
|
+
|
794
|
+
#
|
795
|
+
# [false] (true / false) whether to show active date in the legend. If you have more then
|
796
|
+
# one chart it would be wise to set only one chart to show this date #
|
797
|
+
attr_accessor :negative_color
|
798
|
+
|
799
|
+
#
|
800
|
+
# [false] (true / false) If you don't want the date to be shown when the mouse is not
|
801
|
+
# over the plot area, set this to true #
|
802
|
+
attr_accessor :show_date
|
803
|
+
|
804
|
+
#
|
805
|
+
# [10] (Number) the size of legend key #
|
806
|
+
attr_accessor :hide_date_on_period
|
807
|
+
|
808
|
+
#
|
809
|
+
# [round] (round / square / line) the shape of legend key #
|
810
|
+
attr_accessor :key_size
|
811
|
+
|
812
|
+
#
|
813
|
+
# [true] (true / false) Whether it is possible to turn show/hide the graph by clicking on
|
814
|
+
# the legend key #
|
815
|
+
attr_accessor :key_type
|
816
|
+
|
817
|
+
#
|
818
|
+
#
|
819
|
+
attr_accessor :graph_on_off
|
820
|
+
end
|
821
|
+
#
|
822
|
+
# [true] (true / false) in stock charts, when comparing one stock with another it is used
|
823
|
+
# to recalculate chart values to percents, as the difference between values of different
|
824
|
+
# stocks can be very big. However, if you compare close values, for example unique visitors
|
825
|
+
# with new visitors, it would be better not to recalculate values #
|
826
|
+
class Comparing
|
827
|
+
include Base
|
828
|
+
|
829
|
+
VALUES = [:recalculate,:recalculate_from_start,:base_date,:width,:dashed,:use_graph_color,:alpha,:smoothed]
|
830
|
+
#
|
831
|
+
# [false] (true / false) If the <recalculate> setting is set to true, the chart recalculates
|
832
|
+
# values to percents. If this setting is set to false, then it takes the first value of a selected
|
833
|
+
# period as a base value. If you set this setting to "true", the first value of a graph will be used
|
834
|
+
# as base value. #
|
835
|
+
attr_accessor :recalculate
|
836
|
+
|
837
|
+
#
|
838
|
+
# [] (date in date format, specified in data set settings) You can set the base date,
|
839
|
+
# using which value the data will be recalculated when comparing data sets. This might be useful for
|
840
|
+
# structured products. #
|
841
|
+
attr_accessor :recalculate_from_start
|
842
|
+
|
843
|
+
#
|
844
|
+
# [0] (Number) with of graph line of comparing data sets #
|
845
|
+
attr_accessor :base_date
|
846
|
+
|
847
|
+
#
|
848
|
+
# [false] (true / false) whether the comparing graph should be dashed #
|
849
|
+
attr_accessor :width
|
850
|
+
|
851
|
+
#
|
852
|
+
# [false] (true / false) whether the comparing graph should be use the same color as the one you are
|
853
|
+
# comparing to. This makes sense if you set <dashed>true</dashed> #
|
854
|
+
attr_accessor :dashed
|
855
|
+
|
856
|
+
#
|
857
|
+
# [100] (0 - 100) opacity of graph line of comparing data sets #
|
858
|
+
attr_accessor :use_graph_color
|
859
|
+
|
860
|
+
#
|
861
|
+
# [false] (true / false) whether to smooth line or not #
|
862
|
+
attr_accessor :alpha
|
863
|
+
|
864
|
+
#
|
865
|
+
#
|
866
|
+
attr_accessor :smoothed
|
867
|
+
end
|
868
|
+
#
|
869
|
+
# [true] (true / false) Whether to show balloon with description on roll-over the flag or not. #
|
870
|
+
class Events
|
871
|
+
include Base
|
872
|
+
|
873
|
+
VALUES = [:show_balloon,:use_hand_cursor,:url_target,:bullet,:color,:color_hover,:border_color,:border_alpha,:text_color,:size,:hide_period]
|
874
|
+
#
|
875
|
+
# [false] (true / false) Whether to change mouse cursor to hand on roll-over or not. #
|
876
|
+
attr_accessor :show_balloon
|
877
|
+
|
878
|
+
#
|
879
|
+
# [] (_blank, _top...) If you set url for this flag, you can define target of the window in which
|
880
|
+
# this url will be opened. #
|
881
|
+
attr_accessor :use_hand_cursor
|
882
|
+
|
883
|
+
#
|
884
|
+
# [sign] (sign/flag/pin/round/square/round_outlined/square_outlined/round_outline/square_outline/
|
885
|
+
# /horizontal_line/vertical_line/horizontal_line_dashed/vertical_line_dashed) Only sign, flag and pin
|
886
|
+
# bullets can display letters inside. horizontal_line and horizontal_line_dashed will display the letter
|
887
|
+
# (it can be some longer text) above the line #
|
888
|
+
attr_accessor :url_target
|
889
|
+
|
890
|
+
#
|
891
|
+
# [#FFFFFF] (hex code) bullet color #
|
892
|
+
attr_accessor :bullet
|
893
|
+
|
894
|
+
#
|
895
|
+
# [#CC0000] (hex code) bullet color #
|
896
|
+
attr_accessor :color
|
897
|
+
|
898
|
+
#
|
899
|
+
# [#ABABAB] (hex code) bullet border color #
|
900
|
+
attr_accessor :color_hover
|
901
|
+
|
902
|
+
#
|
903
|
+
# [100] (0 - 100) bullet border opacity #
|
904
|
+
attr_accessor :border_color
|
905
|
+
|
906
|
+
#
|
907
|
+
# [#000000] (hex code) flag and sign bullets can have letter inside. This setting defines text
|
908
|
+
# color of the letter #
|
909
|
+
attr_accessor :border_alpha
|
910
|
+
|
911
|
+
#
|
912
|
+
# [15] (Number) size of a bullet #
|
913
|
+
attr_accessor :text_color
|
914
|
+
|
915
|
+
#
|
916
|
+
# [] (mm / hh / DD / WW / MM / YYYY) You might want to hide the bullets if your data
|
917
|
+
# is grouped into longer periods #
|
918
|
+
attr_accessor :size
|
919
|
+
|
920
|
+
#
|
921
|
+
#
|
922
|
+
attr_accessor :hide_period
|
923
|
+
end
|
924
|
+
#
|
925
|
+
# first graph #
|
926
|
+
class Graphs
|
927
|
+
include Base
|
928
|
+
|
929
|
+
VALUES = [:graph]
|
930
|
+
#
|
931
|
+
# [left] (left / right) axis of this graph #
|
932
|
+
attr_accessor :graph
|
933
|
+
|
934
|
+
|
935
|
+
#
|
936
|
+
# [left] (left / right) axis of this graph #
|
937
|
+
class Graph
|
938
|
+
include Base
|
939
|
+
|
940
|
+
VALUES = [:axis,:type,:connect,:data_sources,:period_value,:compare_source,:title,:color,:cursor_color,:cursor_alpha,:positive_color,:negative_color,:width,:alpha,:fill_alpha,:dashed,:bullet,:bullet_size,:smoothed,:stack_to,:legend]
|
941
|
+
ATTRIBUTES = [:gid]
|
942
|
+
#
|
943
|
+
# [line] (line / column / candlestick / ohlc / step / step_no_risers ) the type of this graph #
|
944
|
+
attr_accessor :axis
|
945
|
+
|
946
|
+
#
|
947
|
+
# [true] (true / false) whether to connect data points if there are some missing data between
|
948
|
+
# them. This applies for line and step line graph types only. #
|
949
|
+
attr_accessor :type
|
950
|
+
|
951
|
+
#
|
952
|
+
# data sources define which column from data CSV file will be used.
|
953
|
+
# line, column and step charts requires <close> data source only
|
954
|
+
# candlestick and ohlc charts requires <open>, <close>, <low> and <high> data sources #
|
955
|
+
attr_accessor :connect
|
956
|
+
|
957
|
+
#
|
958
|
+
#
|
959
|
+
attr_accessor :data_sources
|
960
|
+
|
961
|
+
#
|
962
|
+
# [] (the name of column) you should set which column of your data sets will be used
|
963
|
+
# for "comparing" graph. Do not set anything here if this graph doesn't need to be compared #
|
964
|
+
attr_accessor :period_value
|
965
|
+
|
966
|
+
#
|
967
|
+
# [] (text) title of the graph can be displayed in the legend #
|
968
|
+
attr_accessor :compare_source
|
969
|
+
|
970
|
+
#
|
971
|
+
# [data_set.color] (hex code) by default, graph uses data set color. However, as you
|
972
|
+
# can have more then one graph from one data set, you can set different color here #
|
973
|
+
attr_accessor :title
|
974
|
+
|
975
|
+
#
|
976
|
+
# [data_set.color] (hex code) #
|
977
|
+
attr_accessor :color
|
978
|
+
|
979
|
+
#
|
980
|
+
# [100] (0 - 100) opacity of the cursor#
|
981
|
+
attr_accessor :cursor_color
|
982
|
+
|
983
|
+
#
|
984
|
+
# [#00CC00] (hex code) "candlestick" and "ohlc" chart types do not use graph color, they
|
985
|
+
# use positive and negative colors to show whether value of the period increased or decreased #
|
986
|
+
attr_accessor :cursor_alpha
|
987
|
+
|
988
|
+
#
|
989
|
+
# [#CC0000] (hex code) #
|
990
|
+
attr_accessor :positive_color
|
991
|
+
|
992
|
+
#
|
993
|
+
# [0] (Number) width of a line (in case type is "line", "step" or "ohlc"), also for
|
994
|
+
# high/low of "candlestick". If you set column_width to 0, vertical lines will also use this
|
995
|
+
# width #
|
996
|
+
attr_accessor :negative_color
|
997
|
+
|
998
|
+
#
|
999
|
+
# [100] (0 - 100) graph opacity #
|
1000
|
+
attr_accessor :width
|
1001
|
+
|
1002
|
+
#
|
1003
|
+
# [0] (0 - 100) opacity of fill #
|
1004
|
+
attr_accessor :alpha
|
1005
|
+
|
1006
|
+
#
|
1007
|
+
# [false] (true / false) whether the graph should be dashed #
|
1008
|
+
attr_accessor :fill_alpha
|
1009
|
+
|
1010
|
+
#
|
1011
|
+
# [] (round / square / round_outline / square_outline / round_outlined / square_outlined
|
1012
|
+
# only "line" and "step" graph types can have bullets #
|
1013
|
+
attr_accessor :dashed
|
1014
|
+
|
1015
|
+
#
|
1016
|
+
# [6] (Number) #
|
1017
|
+
attr_accessor :bullet
|
1018
|
+
|
1019
|
+
#
|
1020
|
+
# [false] (true / false) whether to smooth line or not #
|
1021
|
+
attr_accessor :bullet_size
|
1022
|
+
|
1023
|
+
#
|
1024
|
+
# [] (gid of another graph) You can stack this graph to another. Graphs can not be smoothed.
|
1025
|
+
# The graph to which you are stacking must be described above the graph which you are stacking. #
|
1026
|
+
attr_accessor :smoothed
|
1027
|
+
|
1028
|
+
#
|
1029
|
+
# the following section describes what information should be shown in the legend. There
|
1030
|
+
# are 4 different states:
|
1031
|
+
# 1) mouse is over plot area and no data sets for comparing are selected - <date>
|
1032
|
+
# 2) mouse is away from plot area and no data sets for comparing are selected - <period>
|
1033
|
+
# 3) mouse is over plot area and at data set for comparing is selected: - <date_comparing>
|
1034
|
+
# 4) mouse is away plot area and at data set for comparing is selected: - <period_comparing>
|
1035
|
+
#
|
1036
|
+
# "key" attribute defines whether color key should be displayed near the legend entry;
|
1037
|
+
# "title" defines whether short title of the data set should be displayed near the legend entry
|
1038
|
+
#
|
1039
|
+
# Use names of <data_sources> to display value of a date or period:
|
1040
|
+
# {open}, {close}, {high}, {low}
|
1041
|
+
#
|
1042
|
+
# You can aslo use {sum} and {average} to display the sum or average.
|
1043
|
+
#
|
1044
|
+
# If you want to show percent change of a value use the following syntax:
|
1045
|
+
# {close.percents}
|
1046
|
+
#
|
1047
|
+
# If you want to show value change, use:
|
1048
|
+
# {close.change}
|
1049
|
+
#
|
1050
|
+
# Note, that the legend is not wrapped, so you should think about the length of your legend
|
1051
|
+
# #
|
1052
|
+
attr_accessor :stack_to
|
1053
|
+
|
1054
|
+
#
|
1055
|
+
#
|
1056
|
+
attr_accessor :legend
|
1057
|
+
|
1058
|
+
#
|
1059
|
+
# xml attribute
|
1060
|
+
#
|
1061
|
+
attr_accessor :gid
|
1062
|
+
|
1063
|
+
|
1064
|
+
#
|
1065
|
+
#
|
1066
|
+
class DataSources
|
1067
|
+
include Base
|
1068
|
+
|
1069
|
+
VALUES = [:close]
|
1070
|
+
#
|
1071
|
+
#
|
1072
|
+
attr_accessor :close
|
1073
|
+
end
|
1074
|
+
#
|
1075
|
+
#
|
1076
|
+
class Legend
|
1077
|
+
include Base
|
1078
|
+
|
1079
|
+
VALUES = [:date,:period,:date_comparing,:period_comparing,:comparing_only,:digits_after_decimal]
|
1080
|
+
#
|
1081
|
+
#
|
1082
|
+
attr_accessor :date
|
1083
|
+
|
1084
|
+
#
|
1085
|
+
#
|
1086
|
+
attr_accessor :period
|
1087
|
+
|
1088
|
+
#
|
1089
|
+
#
|
1090
|
+
attr_accessor :date_comparing
|
1091
|
+
|
1092
|
+
#
|
1093
|
+
# [false] (true / false) If you set this to true, this graph will not have legend
|
1094
|
+
# entry, only comparing graphs will. #
|
1095
|
+
attr_accessor :period_comparing
|
1096
|
+
|
1097
|
+
#
|
1098
|
+
# defines how many numbers should be displayed after comma #
|
1099
|
+
attr_accessor :comparing_only
|
1100
|
+
|
1101
|
+
#
|
1102
|
+
# [number_format.digits_after_decimal.data] (Number) number of digits after decimal #
|
1103
|
+
attr_accessor :digits_after_decimal
|
1104
|
+
|
1105
|
+
|
1106
|
+
#
|
1107
|
+
# [number_format.digits_after_decimal.data] (Number) number of digits after decimal #
|
1108
|
+
class DigitsAfterDecimal
|
1109
|
+
include Base
|
1110
|
+
|
1111
|
+
VALUES = [:data,:percents]
|
1112
|
+
#
|
1113
|
+
# [number_format.digits_after_decimal.percents] (Number) the number of digits after
|
1114
|
+
# decimal when the values are recalculated to percents #
|
1115
|
+
attr_accessor :data
|
1116
|
+
|
1117
|
+
#
|
1118
|
+
#
|
1119
|
+
attr_accessor :percents
|
1120
|
+
end
|
1121
|
+
end
|
1122
|
+
end
|
1123
|
+
end
|
1124
|
+
end
|
1125
|
+
end
|
1126
|
+
#
|
1127
|
+
# [24] (12 / 24) The time in the legend and x axis might be displayed using 12 or 24 hour format #
|
1128
|
+
class DateFormats
|
1129
|
+
include Base
|
1130
|
+
|
1131
|
+
VALUES = [:hour_format,:x_axis,:legend,:events]
|
1132
|
+
#
|
1133
|
+
#
|
1134
|
+
attr_accessor :hour_format
|
1135
|
+
|
1136
|
+
#
|
1137
|
+
# [hh:mm:ss] #
|
1138
|
+
attr_accessor :x_axis
|
1139
|
+
|
1140
|
+
#
|
1141
|
+
# [hh:mm:ss] #
|
1142
|
+
attr_accessor :legend
|
1143
|
+
|
1144
|
+
#
|
1145
|
+
#
|
1146
|
+
attr_accessor :events
|
1147
|
+
|
1148
|
+
|
1149
|
+
#
|
1150
|
+
# [hh:mm:ss] #
|
1151
|
+
class XAxis
|
1152
|
+
include Base
|
1153
|
+
|
1154
|
+
VALUES = [:seconds,:minutes,:hours,:days,:months,:years]
|
1155
|
+
#
|
1156
|
+
# [hh:mm] #
|
1157
|
+
attr_accessor :seconds
|
1158
|
+
|
1159
|
+
#
|
1160
|
+
# [hh:mm] #
|
1161
|
+
attr_accessor :minutes
|
1162
|
+
|
1163
|
+
#
|
1164
|
+
# [month DD] #
|
1165
|
+
attr_accessor :hours
|
1166
|
+
|
1167
|
+
#
|
1168
|
+
# [month] #
|
1169
|
+
attr_accessor :days
|
1170
|
+
|
1171
|
+
#
|
1172
|
+
# [YYYY] #
|
1173
|
+
attr_accessor :months
|
1174
|
+
|
1175
|
+
#
|
1176
|
+
#
|
1177
|
+
attr_accessor :years
|
1178
|
+
end
|
1179
|
+
#
|
1180
|
+
# [hh:mm:ss] #
|
1181
|
+
class Legend
|
1182
|
+
include Base
|
1183
|
+
|
1184
|
+
VALUES = [:seconds,:minutes,:hours,:days,:weeks,:months,:years]
|
1185
|
+
#
|
1186
|
+
# [hh:mm] #
|
1187
|
+
attr_accessor :seconds
|
1188
|
+
|
1189
|
+
#
|
1190
|
+
# [hh:mm] #
|
1191
|
+
attr_accessor :minutes
|
1192
|
+
|
1193
|
+
#
|
1194
|
+
# [month DD, YYYY] #
|
1195
|
+
attr_accessor :hours
|
1196
|
+
|
1197
|
+
#
|
1198
|
+
# [week of month DD, YYYY] #
|
1199
|
+
attr_accessor :days
|
1200
|
+
|
1201
|
+
#
|
1202
|
+
# [month YYYY] #
|
1203
|
+
attr_accessor :weeks
|
1204
|
+
|
1205
|
+
#
|
1206
|
+
# [YYYY] #
|
1207
|
+
attr_accessor :months
|
1208
|
+
|
1209
|
+
#
|
1210
|
+
#
|
1211
|
+
attr_accessor :years
|
1212
|
+
end
|
1213
|
+
end
|
1214
|
+
#
|
1215
|
+
# [true] (true / false) whether to show data set selector or not #
|
1216
|
+
class DataSetSelector
|
1217
|
+
include Base
|
1218
|
+
|
1219
|
+
VALUES = [:enabled,:position,:width,:text_size,:text_color,:max_comparing_count,:main_drop_down_title,:compare_list_box_title,:drop_down]
|
1220
|
+
#
|
1221
|
+
# [right] (right / left) #
|
1222
|
+
attr_accessor :enabled
|
1223
|
+
|
1224
|
+
#
|
1225
|
+
# [180] (Number) #
|
1226
|
+
attr_accessor :position
|
1227
|
+
|
1228
|
+
#
|
1229
|
+
# [text_size] (Number) #
|
1230
|
+
attr_accessor :width
|
1231
|
+
|
1232
|
+
#
|
1233
|
+
# [text_color] (hex code) #
|
1234
|
+
attr_accessor :text_size
|
1235
|
+
|
1236
|
+
#
|
1237
|
+
# [3] (Number) in order to avoid mess, you can limit max number of data
|
1238
|
+
# sets selected for comparing at a time #
|
1239
|
+
attr_accessor :text_color
|
1240
|
+
|
1241
|
+
#
|
1242
|
+
# [] (text) #
|
1243
|
+
attr_accessor :max_comparing_count
|
1244
|
+
|
1245
|
+
#
|
1246
|
+
# [] (text) #
|
1247
|
+
attr_accessor :main_drop_down_title
|
1248
|
+
|
1249
|
+
#
|
1250
|
+
# style of a drop down and list box #
|
1251
|
+
attr_accessor :compare_list_box_title
|
1252
|
+
|
1253
|
+
#
|
1254
|
+
# [#FFFFFF] (hex code) #
|
1255
|
+
attr_accessor :drop_down
|
1256
|
+
|
1257
|
+
|
1258
|
+
#
|
1259
|
+
# [#FFFFFF] (hex code) #
|
1260
|
+
class DropDown
|
1261
|
+
include Base
|
1262
|
+
|
1263
|
+
VALUES = [:bg_color,:bg_color_selected,:bg_color_hover,:text_size,:text_color,:text_color_selected,:border_color,:border_width,:scroller_color,:scroller_bg_color,:arrow_color,:corner_radius]
|
1264
|
+
#
|
1265
|
+
# [#EEEEEE] (hex code) #
|
1266
|
+
attr_accessor :bg_color
|
1267
|
+
|
1268
|
+
#
|
1269
|
+
# [#DDDDDD] (hex code) #
|
1270
|
+
attr_accessor :bg_color_selected
|
1271
|
+
|
1272
|
+
#
|
1273
|
+
# [data_set_selector.text_size]#
|
1274
|
+
attr_accessor :bg_color_hover
|
1275
|
+
|
1276
|
+
#
|
1277
|
+
# [data_set_selector.text_color] (hex code) #
|
1278
|
+
attr_accessor :text_size
|
1279
|
+
|
1280
|
+
#
|
1281
|
+
# [data_set_selector.text_color] (hex code) #
|
1282
|
+
attr_accessor :text_color
|
1283
|
+
|
1284
|
+
#
|
1285
|
+
# [#ABABAB] (hex code) #
|
1286
|
+
attr_accessor :text_color_selected
|
1287
|
+
|
1288
|
+
#
|
1289
|
+
# [0] (Number) #
|
1290
|
+
attr_accessor :border_color
|
1291
|
+
|
1292
|
+
#
|
1293
|
+
# [#c7c7c7] (hex code) #
|
1294
|
+
attr_accessor :border_width
|
1295
|
+
|
1296
|
+
#
|
1297
|
+
# [#EFEFEF] (hex code) #
|
1298
|
+
attr_accessor :scroller_color
|
1299
|
+
|
1300
|
+
#
|
1301
|
+
# [#ABABAB] (hex code) #
|
1302
|
+
attr_accessor :scroller_bg_color
|
1303
|
+
|
1304
|
+
#
|
1305
|
+
# [3] (Number) #
|
1306
|
+
attr_accessor :arrow_color
|
1307
|
+
|
1308
|
+
#
|
1309
|
+
#
|
1310
|
+
attr_accessor :corner_radius
|
1311
|
+
end
|
1312
|
+
end
|
1313
|
+
#
|
1314
|
+
# [true] (true / false) whether to show period selector or not #
|
1315
|
+
class PeriodSelector
|
1316
|
+
include Base
|
1317
|
+
|
1318
|
+
VALUES = [:enabled,:custom_period_enabled,:position,:text_size,:text_color,:button,:input,:periods,:zoom_to_end,:periods_title,:custom_period_title,:from,:to]
|
1319
|
+
#
|
1320
|
+
# [true] (true / false) whether to show custom period input fields or not #
|
1321
|
+
attr_accessor :enabled
|
1322
|
+
|
1323
|
+
#
|
1324
|
+
# [bottom] (top / bottom) period selector position #
|
1325
|
+
attr_accessor :custom_period_enabled
|
1326
|
+
|
1327
|
+
#
|
1328
|
+
# [text_size] (Number) #
|
1329
|
+
attr_accessor :position
|
1330
|
+
|
1331
|
+
#
|
1332
|
+
# [text_color] (hex code) #
|
1333
|
+
attr_accessor :text_size
|
1334
|
+
|
1335
|
+
#
|
1336
|
+
#
|
1337
|
+
attr_accessor :text_color
|
1338
|
+
|
1339
|
+
#
|
1340
|
+
# [#FFFFFF] (hex code) #
|
1341
|
+
attr_accessor :button
|
1342
|
+
|
1343
|
+
#
|
1344
|
+
# [#FFFFFF] () #
|
1345
|
+
attr_accessor :input
|
1346
|
+
|
1347
|
+
#
|
1348
|
+
#
|
1349
|
+
attr_accessor :periods
|
1350
|
+
|
1351
|
+
#
|
1352
|
+
# [] (text) #
|
1353
|
+
attr_accessor :zoom_to_end
|
1354
|
+
|
1355
|
+
#
|
1356
|
+
# [] (text) #
|
1357
|
+
attr_accessor :periods_title
|
1358
|
+
|
1359
|
+
#
|
1360
|
+
# [] (date) You can set start date from which the chart will be shown when loaded
|
1361
|
+
# (the selected predefined period will be ignored if the date is set here) #
|
1362
|
+
attr_accessor :custom_period_title
|
1363
|
+
|
1364
|
+
#
|
1365
|
+
# [] (date) You can set end date util which the chart will be shown when loaded
|
1366
|
+
# If you set "from" date and do not set "to" date, the last date of the data set will be used #
|
1367
|
+
attr_accessor :from
|
1368
|
+
|
1369
|
+
#
|
1370
|
+
#
|
1371
|
+
attr_accessor :to
|
1372
|
+
|
1373
|
+
|
1374
|
+
#
|
1375
|
+
# [#FFFFFF] (hex code) #
|
1376
|
+
class Button
|
1377
|
+
include Base
|
1378
|
+
|
1379
|
+
VALUES = [:bg_color,:bg_color_hover,:bg_color_selected,:text_size,:text_color,:text_color_hover,:text_color_selected,:border_color,:border_color_hover,:border_color_selected,:border_width,:corner_radius]
|
1380
|
+
#
|
1381
|
+
# [#ABABAB] (hex code) #
|
1382
|
+
attr_accessor :bg_color
|
1383
|
+
|
1384
|
+
#
|
1385
|
+
# [#ABABAB] (hex code) #
|
1386
|
+
attr_accessor :bg_color_hover
|
1387
|
+
|
1388
|
+
#
|
1389
|
+
# [period_selector.text_size] (Number) #
|
1390
|
+
attr_accessor :bg_color_selected
|
1391
|
+
|
1392
|
+
#
|
1393
|
+
# [period_selector.text_color] (hex code) #
|
1394
|
+
attr_accessor :text_size
|
1395
|
+
|
1396
|
+
#
|
1397
|
+
# [period_selector.text_color] (hex code) #
|
1398
|
+
attr_accessor :text_color
|
1399
|
+
|
1400
|
+
#
|
1401
|
+
# [period_selector.text_color] (hex code) #
|
1402
|
+
attr_accessor :text_color_hover
|
1403
|
+
|
1404
|
+
#
|
1405
|
+
# [#ABABAB] (hex code) #
|
1406
|
+
attr_accessor :text_color_selected
|
1407
|
+
|
1408
|
+
#
|
1409
|
+
# [#ABABAB] (hex code) #
|
1410
|
+
attr_accessor :border_color
|
1411
|
+
|
1412
|
+
#
|
1413
|
+
# [#ABABAB] (hex code) #
|
1414
|
+
attr_accessor :border_color_hover
|
1415
|
+
|
1416
|
+
#
|
1417
|
+
# [0] (Number) #
|
1418
|
+
attr_accessor :border_color_selected
|
1419
|
+
|
1420
|
+
#
|
1421
|
+
# [3] (Number) #
|
1422
|
+
attr_accessor :border_width
|
1423
|
+
|
1424
|
+
#
|
1425
|
+
#
|
1426
|
+
attr_accessor :corner_radius
|
1427
|
+
end
|
1428
|
+
#
|
1429
|
+
# [#FFFFFF] () #
|
1430
|
+
class Input
|
1431
|
+
include Base
|
1432
|
+
|
1433
|
+
VALUES = [:bg_color,:text_size,:text_color,:border_color,:border_width,:corner_radius]
|
1434
|
+
#
|
1435
|
+
# [period_selector.text_size] (Number) #
|
1436
|
+
attr_accessor :bg_color
|
1437
|
+
|
1438
|
+
#
|
1439
|
+
# [period_selector.text_color] (hex code) #
|
1440
|
+
attr_accessor :text_size
|
1441
|
+
|
1442
|
+
#
|
1443
|
+
# [#ABABAB] (hex code) #
|
1444
|
+
attr_accessor :text_color
|
1445
|
+
|
1446
|
+
#
|
1447
|
+
# [0] (Number) #
|
1448
|
+
attr_accessor :border_color
|
1449
|
+
|
1450
|
+
#
|
1451
|
+
# [3] (Number) #
|
1452
|
+
attr_accessor :border_width
|
1453
|
+
|
1454
|
+
#
|
1455
|
+
#
|
1456
|
+
attr_accessor :corner_radius
|
1457
|
+
end
|
1458
|
+
#
|
1459
|
+
#
|
1460
|
+
class Periods
|
1461
|
+
include Base
|
1462
|
+
|
1463
|
+
VALUES = [:period]
|
1464
|
+
#
|
1465
|
+
#
|
1466
|
+
attr_accessor :period
|
1467
|
+
end
|
1468
|
+
end
|
1469
|
+
#
|
1470
|
+
# [true] (true / false) #
|
1471
|
+
class Header
|
1472
|
+
include Base
|
1473
|
+
|
1474
|
+
VALUES = [:enabled,:text,:margins,:text_size,:text_color,:bg_color,:bg_alpha,:border_alpha,:border_color,:border_width,:corner_radius]
|
1475
|
+
#
|
1476
|
+
# [] (text) #
|
1477
|
+
attr_accessor :enabled
|
1478
|
+
|
1479
|
+
#
|
1480
|
+
# [0] (Number) #
|
1481
|
+
attr_accessor :text
|
1482
|
+
|
1483
|
+
#
|
1484
|
+
# [text_size] (Number) #
|
1485
|
+
attr_accessor :margins
|
1486
|
+
|
1487
|
+
#
|
1488
|
+
# [text_color] (hex code) #
|
1489
|
+
attr_accessor :text_size
|
1490
|
+
|
1491
|
+
#
|
1492
|
+
# [#FFFFFF] (hex code) #
|
1493
|
+
attr_accessor :text_color
|
1494
|
+
|
1495
|
+
#
|
1496
|
+
# [0] (Number) #
|
1497
|
+
attr_accessor :bg_color
|
1498
|
+
|
1499
|
+
#
|
1500
|
+
# [0] (Number) #
|
1501
|
+
attr_accessor :bg_alpha
|
1502
|
+
|
1503
|
+
#
|
1504
|
+
# [#ABABAB] (hex code) #
|
1505
|
+
attr_accessor :border_alpha
|
1506
|
+
|
1507
|
+
#
|
1508
|
+
# [0] (Number) #
|
1509
|
+
attr_accessor :border_color
|
1510
|
+
|
1511
|
+
#
|
1512
|
+
# [0] (Number) #
|
1513
|
+
attr_accessor :border_width
|
1514
|
+
|
1515
|
+
#
|
1516
|
+
#
|
1517
|
+
attr_accessor :corner_radius
|
1518
|
+
end
|
1519
|
+
#
|
1520
|
+
# [#FFFFFF] (hex code) #
|
1521
|
+
class Balloon
|
1522
|
+
include Base
|
1523
|
+
|
1524
|
+
VALUES = [:bg_color,:bg_alpha,:text_color,:text_size,:border_color,:border_width,:border_alpha,:corner_radius]
|
1525
|
+
#
|
1526
|
+
# [90] (hex code) #
|
1527
|
+
attr_accessor :bg_color
|
1528
|
+
|
1529
|
+
#
|
1530
|
+
# [#000000] (hex code) #
|
1531
|
+
attr_accessor :bg_alpha
|
1532
|
+
|
1533
|
+
#
|
1534
|
+
# [text_size] (Number) #
|
1535
|
+
attr_accessor :text_color
|
1536
|
+
|
1537
|
+
#
|
1538
|
+
# [#b81d1b] (hex code) #
|
1539
|
+
attr_accessor :text_size
|
1540
|
+
|
1541
|
+
#
|
1542
|
+
# [2] (Number) #
|
1543
|
+
attr_accessor :border_color
|
1544
|
+
|
1545
|
+
#
|
1546
|
+
# [100] (0 - 100) #
|
1547
|
+
attr_accessor :border_width
|
1548
|
+
|
1549
|
+
#
|
1550
|
+
# [5] (Number) #
|
1551
|
+
attr_accessor :border_alpha
|
1552
|
+
|
1553
|
+
#
|
1554
|
+
#
|
1555
|
+
attr_accessor :corner_radius
|
1556
|
+
end
|
1557
|
+
#
|
1558
|
+
# [#FFFFFF] (hex code) #
|
1559
|
+
class Background
|
1560
|
+
include Base
|
1561
|
+
|
1562
|
+
VALUES = [:color,:alpha,:border_color,:border_alpha]
|
1563
|
+
#
|
1564
|
+
# [0] (Number) #
|
1565
|
+
attr_accessor :color
|
1566
|
+
|
1567
|
+
#
|
1568
|
+
# [#000000] #
|
1569
|
+
attr_accessor :alpha
|
1570
|
+
|
1571
|
+
#
|
1572
|
+
# [0] (Number)#
|
1573
|
+
attr_accessor :border_color
|
1574
|
+
|
1575
|
+
#
|
1576
|
+
#
|
1577
|
+
attr_accessor :border_alpha
|
1578
|
+
end
|
1579
|
+
#
|
1580
|
+
# [0] (Number) #
|
1581
|
+
class PlotArea
|
1582
|
+
include Base
|
1583
|
+
|
1584
|
+
VALUES = [:margins,:bg_color,:bg_alpha,:border_alpha,:border_color,:border_width,:corner_radius]
|
1585
|
+
#
|
1586
|
+
# [#FFFFFF] (hex code) #
|
1587
|
+
attr_accessor :margins
|
1588
|
+
|
1589
|
+
#
|
1590
|
+
# [0] (Number) #
|
1591
|
+
attr_accessor :bg_color
|
1592
|
+
|
1593
|
+
#
|
1594
|
+
# [0] (Number) #
|
1595
|
+
attr_accessor :bg_alpha
|
1596
|
+
|
1597
|
+
#
|
1598
|
+
# [0xABABAB] (hex code) #
|
1599
|
+
attr_accessor :border_alpha
|
1600
|
+
|
1601
|
+
#
|
1602
|
+
# [0] (Number) #
|
1603
|
+
attr_accessor :border_color
|
1604
|
+
|
1605
|
+
#
|
1606
|
+
# [0] (Number) #
|
1607
|
+
attr_accessor :border_width
|
1608
|
+
|
1609
|
+
#
|
1610
|
+
#
|
1611
|
+
attr_accessor :corner_radius
|
1612
|
+
end
|
1613
|
+
#
|
1614
|
+
# [true] (true / false) #
|
1615
|
+
class Scroller
|
1616
|
+
include Base
|
1617
|
+
|
1618
|
+
VALUES = [:enabled,:connect,:height,:graph_data_source,:bg_color,:bg_alpha,:selected_color,:graph_color,:graph_alpha,:graph_width,:graph_fill_alpha,:graph_selected_color,:graph_selected_alpha,:graph_selected_fill_alpha,:graph_selected_fill_color,:resize_button_style,:resize_button_color,:resize_pointer_color,:grid,:values,:playback]
|
1619
|
+
#
|
1620
|
+
# [true] (true / false) whether to connect the data points with a line when some data is missing
|
1621
|
+
# between them #
|
1622
|
+
attr_accessor :enabled
|
1623
|
+
|
1624
|
+
#
|
1625
|
+
# [45] (Number) #
|
1626
|
+
attr_accessor :connect
|
1627
|
+
|
1628
|
+
#
|
1629
|
+
# [] (column name) scrollers graph's data source #
|
1630
|
+
attr_accessor :height
|
1631
|
+
|
1632
|
+
#
|
1633
|
+
# [#EEEEEE] (hec code) #
|
1634
|
+
attr_accessor :graph_data_source
|
1635
|
+
|
1636
|
+
#
|
1637
|
+
# [100] (0 - 100) #
|
1638
|
+
attr_accessor :bg_color
|
1639
|
+
|
1640
|
+
#
|
1641
|
+
# [#FFFFFF] (hex code) #
|
1642
|
+
attr_accessor :bg_alpha
|
1643
|
+
|
1644
|
+
#
|
1645
|
+
# [#ABABAB] (hex code) color of not selected graph #
|
1646
|
+
attr_accessor :selected_color
|
1647
|
+
|
1648
|
+
#
|
1649
|
+
# [50] (Number) #
|
1650
|
+
attr_accessor :graph_color
|
1651
|
+
|
1652
|
+
#
|
1653
|
+
# [0] (Number) #
|
1654
|
+
attr_accessor :graph_alpha
|
1655
|
+
|
1656
|
+
#
|
1657
|
+
# [20] (Number) #
|
1658
|
+
attr_accessor :graph_width
|
1659
|
+
|
1660
|
+
#
|
1661
|
+
# [data_set.color] (hec code) #
|
1662
|
+
attr_accessor :graph_fill_alpha
|
1663
|
+
|
1664
|
+
#
|
1665
|
+
# [50] (Number) #
|
1666
|
+
attr_accessor :graph_selected_color
|
1667
|
+
|
1668
|
+
#
|
1669
|
+
# [20] (Number) #
|
1670
|
+
attr_accessor :graph_selected_alpha
|
1671
|
+
|
1672
|
+
#
|
1673
|
+
# [graph_selected_color] (hex code) The selected part of a graph can be filled with some color.
|
1674
|
+
# If you separate two color codes with a comma here, the first one will be used to fill the part above
|
1675
|
+
# the 0 and the second one - below the 0 #
|
1676
|
+
attr_accessor :graph_selected_fill_alpha
|
1677
|
+
|
1678
|
+
#
|
1679
|
+
# [arrow] (arrow / dragger) #
|
1680
|
+
attr_accessor :graph_selected_fill_color
|
1681
|
+
|
1682
|
+
#
|
1683
|
+
# [#000000] (hex code) this setting is effective only if resize_button_style is set to "arrow" #
|
1684
|
+
attr_accessor :resize_button_style
|
1685
|
+
|
1686
|
+
#
|
1687
|
+
# [#000000] (hex code) #
|
1688
|
+
attr_accessor :resize_button_color
|
1689
|
+
|
1690
|
+
#
|
1691
|
+
#
|
1692
|
+
attr_accessor :resize_pointer_color
|
1693
|
+
|
1694
|
+
#
|
1695
|
+
# [true] (true / false) #
|
1696
|
+
attr_accessor :grid
|
1697
|
+
|
1698
|
+
#
|
1699
|
+
# [true] (true / false) #
|
1700
|
+
attr_accessor :values
|
1701
|
+
|
1702
|
+
#
|
1703
|
+
# [false] (true / false) #
|
1704
|
+
attr_accessor :playback
|
1705
|
+
|
1706
|
+
|
1707
|
+
#
|
1708
|
+
# [true] (true / false) #
|
1709
|
+
class Grid
|
1710
|
+
include Base
|
1711
|
+
|
1712
|
+
VALUES = [:enabled,:max_count,:color,:alpha,:dashed,:dash_lenght]
|
1713
|
+
#
|
1714
|
+
# [5] (Number) #
|
1715
|
+
attr_accessor :enabled
|
1716
|
+
|
1717
|
+
#
|
1718
|
+
# [#FFFFFF] (hex code) #
|
1719
|
+
attr_accessor :max_count
|
1720
|
+
|
1721
|
+
#
|
1722
|
+
# [40] (Number) #
|
1723
|
+
attr_accessor :color
|
1724
|
+
|
1725
|
+
#
|
1726
|
+
# [false] (true / false) #
|
1727
|
+
attr_accessor :alpha
|
1728
|
+
|
1729
|
+
#
|
1730
|
+
# [5] (Number) #
|
1731
|
+
attr_accessor :dashed
|
1732
|
+
|
1733
|
+
#
|
1734
|
+
#
|
1735
|
+
attr_accessor :dash_lenght
|
1736
|
+
end
|
1737
|
+
#
|
1738
|
+
# [true] (true / false) #
|
1739
|
+
class Values
|
1740
|
+
include Base
|
1741
|
+
|
1742
|
+
VALUES = [:enabled,:text_color,:text_size]
|
1743
|
+
#
|
1744
|
+
# [text_color] (hex code) #
|
1745
|
+
attr_accessor :enabled
|
1746
|
+
|
1747
|
+
#
|
1748
|
+
# [text_size] (Number) #
|
1749
|
+
attr_accessor :text_color
|
1750
|
+
|
1751
|
+
#
|
1752
|
+
#
|
1753
|
+
attr_accessor :text_size
|
1754
|
+
end
|
1755
|
+
#
|
1756
|
+
# [false] (true / false) #
|
1757
|
+
class Playback
|
1758
|
+
include Base
|
1759
|
+
|
1760
|
+
VALUES = [:enabled,:color,:color_hover,:speed,:max_speed,:loop,:speed_indicator]
|
1761
|
+
#
|
1762
|
+
# [#000000] (hex code) #
|
1763
|
+
attr_accessor :enabled
|
1764
|
+
|
1765
|
+
#
|
1766
|
+
# [#CC0000] (hex code) #
|
1767
|
+
attr_accessor :color
|
1768
|
+
|
1769
|
+
#
|
1770
|
+
# [5] (Number) #
|
1771
|
+
attr_accessor :color_hover
|
1772
|
+
|
1773
|
+
#
|
1774
|
+
# [10] (Number) #
|
1775
|
+
attr_accessor :speed
|
1776
|
+
|
1777
|
+
#
|
1778
|
+
# [true] (true / false) #
|
1779
|
+
attr_accessor :max_speed
|
1780
|
+
|
1781
|
+
#
|
1782
|
+
#
|
1783
|
+
attr_accessor :loop
|
1784
|
+
|
1785
|
+
#
|
1786
|
+
# [true] (true / false) #
|
1787
|
+
attr_accessor :speed_indicator
|
1788
|
+
|
1789
|
+
|
1790
|
+
#
|
1791
|
+
# [true] (true / false) #
|
1792
|
+
class SpeedIndicator
|
1793
|
+
include Base
|
1794
|
+
|
1795
|
+
VALUES = [:enabled,:color,:bg_color]
|
1796
|
+
#
|
1797
|
+
# [#000000] (hex code) #
|
1798
|
+
attr_accessor :enabled
|
1799
|
+
|
1800
|
+
#
|
1801
|
+
# [#ABABAB] (hex code) #
|
1802
|
+
attr_accessor :color
|
1803
|
+
|
1804
|
+
#
|
1805
|
+
#
|
1806
|
+
attr_accessor :bg_color
|
1807
|
+
end
|
1808
|
+
end
|
1809
|
+
end
|
1810
|
+
#
|
1811
|
+
# "function_name" specifies JavaScript function which will be called when user clicks on
|
1812
|
+
# this menu. You can pass variables, for example: function_name="alert('something')".
|
1813
|
+
# "title" sets menu item text. Do not use for title: Show all, Zoom in, Zoom out, Print, Settings...
|
1814
|
+
# You can have any number of custom menus. Uncomment the line below to enable this menu and add
|
1815
|
+
# apropriate JS function to your html file. #
|
1816
|
+
class ContextMenu
|
1817
|
+
include Base
|
1818
|
+
|
1819
|
+
VALUES = [:menu,:default_items]
|
1820
|
+
#
|
1821
|
+
#
|
1822
|
+
attr_accessor :menu
|
1823
|
+
|
1824
|
+
#
|
1825
|
+
# [false] (true / false) to show or not flash player zoom menu#
|
1826
|
+
attr_accessor :default_items
|
1827
|
+
|
1828
|
+
|
1829
|
+
#
|
1830
|
+
# [false] (true / false) to show or not flash player zoom menu#
|
1831
|
+
class DefaultItems
|
1832
|
+
include Base
|
1833
|
+
|
1834
|
+
VALUES = [:zoom,:print]
|
1835
|
+
#
|
1836
|
+
# [true] (true / false) to show or not flash player print menu#
|
1837
|
+
attr_accessor :zoom
|
1838
|
+
|
1839
|
+
#
|
1840
|
+
#
|
1841
|
+
attr_accessor :print
|
1842
|
+
end
|
1843
|
+
end
|
1844
|
+
#
|
1845
|
+
# [] (filename) if you set filename here, context menu (then user right clicks on flash movie)
|
1846
|
+
# "Export as image" will appear. This will allow user to export chart as an image. Collected image
|
1847
|
+
# data will be posted to this file name (use amstock/export.php or amstock/export.aspx) #
|
1848
|
+
class ExportAsImage
|
1849
|
+
include Base
|
1850
|
+
|
1851
|
+
VALUES = [:file,:target,:color,:alpha,:text_color,:text_size]
|
1852
|
+
#
|
1853
|
+
# [] (_blank, _top ...) target of a window in which export file must be called #
|
1854
|
+
attr_accessor :file
|
1855
|
+
|
1856
|
+
#
|
1857
|
+
# [#54b40a] (hex code) background color of "Collecting data" text #
|
1858
|
+
attr_accessor :target
|
1859
|
+
|
1860
|
+
#
|
1861
|
+
# [0] (0 - 100) background alpha #
|
1862
|
+
attr_accessor :color
|
1863
|
+
|
1864
|
+
#
|
1865
|
+
# [text_color] (hex color code) #
|
1866
|
+
attr_accessor :alpha
|
1867
|
+
|
1868
|
+
#
|
1869
|
+
# [text_size] (Number) #
|
1870
|
+
attr_accessor :text_color
|
1871
|
+
|
1872
|
+
#
|
1873
|
+
#
|
1874
|
+
attr_accessor :text_size
|
1875
|
+
end
|
1876
|
+
#
|
1877
|
+
# [Processing data] (text) #
|
1878
|
+
class Strings
|
1879
|
+
include Base
|
1880
|
+
|
1881
|
+
VALUES = [:processing_data,:loading_data,:wrong_date_format,:export_as_image,:collecting_data,:no_data,:months,:weekdays]
|
1882
|
+
#
|
1883
|
+
# [Loading data] (text) #
|
1884
|
+
attr_accessor :processing_data
|
1885
|
+
|
1886
|
+
#
|
1887
|
+
# [Check date format] (text) #
|
1888
|
+
attr_accessor :loading_data
|
1889
|
+
|
1890
|
+
#
|
1891
|
+
# [Export as image] (text) #
|
1892
|
+
attr_accessor :wrong_date_format
|
1893
|
+
|
1894
|
+
#
|
1895
|
+
# [Collecting data] (text) #
|
1896
|
+
attr_accessor :export_as_image
|
1897
|
+
|
1898
|
+
#
|
1899
|
+
# [No data] (text) #
|
1900
|
+
attr_accessor :collecting_data
|
1901
|
+
|
1902
|
+
#
|
1903
|
+
#
|
1904
|
+
attr_accessor :no_data
|
1905
|
+
|
1906
|
+
#
|
1907
|
+
#
|
1908
|
+
attr_accessor :months
|
1909
|
+
|
1910
|
+
#
|
1911
|
+
#
|
1912
|
+
attr_accessor :weekdays
|
1913
|
+
|
1914
|
+
|
1915
|
+
#
|
1916
|
+
#
|
1917
|
+
class Months
|
1918
|
+
include Base
|
1919
|
+
|
1920
|
+
VALUES = [:month]
|
1921
|
+
#
|
1922
|
+
#
|
1923
|
+
attr_accessor :month
|
1924
|
+
end
|
1925
|
+
#
|
1926
|
+
#
|
1927
|
+
class Weekdays
|
1928
|
+
include Base
|
1929
|
+
|
1930
|
+
VALUES = [:day]
|
1931
|
+
#
|
1932
|
+
#
|
1933
|
+
attr_accessor :day
|
1934
|
+
end
|
1935
|
+
end
|
1936
|
+
#
|
1937
|
+
# [true] (true / false) #
|
1938
|
+
class ErrorMessages
|
1939
|
+
include Base
|
1940
|
+
|
1941
|
+
VALUES = [:enabled,:color,:alpha,:text_color,:text_size]
|
1942
|
+
#
|
1943
|
+
# [#B81D1B] (hex color code) background color of error message #
|
1944
|
+
attr_accessor :enabled
|
1945
|
+
|
1946
|
+
#
|
1947
|
+
# [100] (0 - 100) background opacity #
|
1948
|
+
attr_accessor :color
|
1949
|
+
|
1950
|
+
#
|
1951
|
+
# [#FFFFFF] (hex color code) #
|
1952
|
+
attr_accessor :alpha
|
1953
|
+
|
1954
|
+
#
|
1955
|
+
# [text_size] (Number)#
|
1956
|
+
attr_accessor :text_color
|
1957
|
+
|
1958
|
+
#
|
1959
|
+
#
|
1960
|
+
attr_accessor :text_size
|
1961
|
+
end
|
1962
|
+
end
|
1963
|
+
end
|
1964
|
+
end
|