Class: Ambling::Stock::Settings

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/ambling/stock.rb

Overview

10

(Number) the distance between the border and content (plot area, period selector, etc #

Defined Under Namespace

Classes: Background, Balloon, Charts, ContextMenu, DataReloading, DataSetSelector, DataSets, DateFormats, ErrorMessages, ExportAsImage, Header, NumberFormat, PeriodSelector, PlotArea, Scroller, Strings

Constant Summary collapse

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]

Instance Attribute Summary collapse

Method Summary

Methods included from Base

#build_xml, #initialize, #populate, #to_xml

Instance Attribute Details

#add_time_stampObject

150

(Number) The maximum number of series. If in the selected period there are more series

then is set here, the chart will show data for a longer period - week, month, year. You can 
specify which value of the period should be used separately for every graph (look for
<period_value>) in graph's settings. If you want to show all series, set 0. Using a lot of series
will slow down scrolling and other interactivity #


40
41
42
# File 'lib/ambling/stock.rb', line 40

def add_time_stamp
  @add_time_stamp
end

#backgroundObject

#FFFFFF

(hex code) #



113
114
115
# File 'lib/ambling/stock.rb', line 113

def background
  @background
end

#balloonObject

#FFFFFF

(hex code) #



109
110
111
# File 'lib/ambling/stock.rb', line 109

def balloon
  @balloon
end

#chartsObject

first chart#



89
90
91
# File 'lib/ambling/stock.rb', line 89

def charts
  @charts
end

#context_menuObject

“function_name” specifies JavaScript function which will be called when user clicks on

this menu. You can pass variables, for example: function_name="alert('something')".
"title" sets menu item text. Do not use for title: Show all, Zoom in, Zoom out, Print, Settings...     
You can have any number of custom menus. Uncomment the line below to enable this menu and add
apropriate JS function to your html file. #


129
130
131
# File 'lib/ambling/stock.rb', line 129

def context_menu
  @context_menu
end

#data_reloadingObject

0

(Number) In case you want chart’s data to be reloaded at some interval, set number bigger then 0 here. Data will be reloaded every x seconds. Note, you can also trigger data reload using javascript function #



77
78
79
# File 'lib/ambling/stock.rb', line 77

def data_reloading
  @data_reloading
end

#data_set_selectorObject

true

(true / false) whether to show data set selector or not #



97
98
99
# File 'lib/ambling/stock.rb', line 97

def data_set_selector
  @data_set_selector
end

#data_setsObject

start of data set settings #



85
86
87
# File 'lib/ambling/stock.rb', line 85

def data_sets
  @data_sets
end

#date_formatsObject

24

(12 / 24) The time in the legend and x axis might be displayed using 12 or 24 hour format #



93
94
95
# File 'lib/ambling/stock.rb', line 93

def date_formats
  @date_formats
end

#equal_spacingObject

true

(true / false) In case <equal_spacing> is set to true, and one of your graph’s type is

"column", then you might want first and last columns to be fully visible. Then set this setting to
"false". Otherwise only half of first and last column will be visible #


58
59
60
# File 'lib/ambling/stock.rb', line 58

def equal_spacing
  @equal_spacing
end

#error_messagesObject

true

(true / false) #



143
144
145
# File 'lib/ambling/stock.rb', line 143

def error_messages
  @error_messages
end

#export_as_imageObject

(filename) if you set filename here, context menu (then user right clicks on flash movie)

"Export as image" will appear. This will allow user to export chart as an image. Collected image
data will be posted to this file name (use amstock/export.php or amstock/export.aspx) #


135
136
137
# File 'lib/ambling/stock.rb', line 135

def export_as_image
  @export_as_image
end

#fontObject

11

(Number) #



18
19
20
# File 'lib/ambling/stock.rb', line 18

def font
  @font
end

#headerObject

true

(true / false) #



105
106
107
# File 'lib/ambling/stock.rb', line 105

def header
  @header
end

#interactiveObject

Returns the value of attribute interactive.



71
72
73
# File 'lib/ambling/stock.rb', line 71

def interactive
  @interactive
end

#js_enabledObject

true

(true / false) In case you don’t want the chart to be interactive, set this to false #



67
68
69
# File 'lib/ambling/stock.rb', line 67

def js_enabled
  @js_enabled
end

#marginsObject

Arial

(font name) use device fonts, such as Arial, Verdana, Time New Roman, etc #



14
15
16
# File 'lib/ambling/stock.rb', line 14

def margins
  @margins
end

#max_grid_countObject

true

(true / false) If this setting is set to true, series will be placed next to each

other at equal intervals, even your data is not periodical. If you values are at irregular 
intervals and you want this to be visualized on the chart, set this setting to false #


52
53
54
# File 'lib/ambling/stock.rb', line 52

def max_grid_count
  @max_grid_count
end

#max_seriesObject

8

(Number) The maximum number of vertical grid lines and x axis values. The wider your

chart is, the bigger number can be set here. If you set too big number, the x axis values may
overlap. #


46
47
48
# File 'lib/ambling/stock.rb', line 46

def max_series
  @max_series
end

#number_formatObject

,

(separator) #



81
82
83
# File 'lib/ambling/stock.rb', line 81

def number_format
  @number_format
end

#period_selectorObject

true

(true / false) whether to show period selector or not #



101
102
103
# File 'lib/ambling/stock.rb', line 101

def period_selector
  @period_selector
end

#plot_areaObject

0

(Number) #



117
118
119
# File 'lib/ambling/stock.rb', line 117

def plot_area
  @plot_area
end

#redrawObject

false

(true / false) if set to true, a unique timestamp will be added to data file name

everytime when loading data. This helps to avoid data caching #


32
33
34
# File 'lib/ambling/stock.rb', line 32

def redraw
  @redraw
end

#scrollerObject

true

(true / false) #



121
122
123
# File 'lib/ambling/stock.rb', line 121

def scroller
  @scroller
end

#start_on_axisObject

true

(true / false) In case you don’t use any flash - JavaScript communication, you shuold

set this setting to false - this will save some CPU. #


63
64
65
# File 'lib/ambling/stock.rb', line 63

def start_on_axis
  @start_on_axis
end

#stringsObject

Processing data

(text) #



139
140
141
# File 'lib/ambling/stock.rb', line 139

def strings
  @strings
end

#text_colorObject

false

(true / false) if your chart’s width or height is set in percents, and redraw is set

to true, the chart will fit then screen when resizing it #


27
28
29
# File 'lib/ambling/stock.rb', line 27

def text_color
  @text_color
end

#text_sizeObject

#000000

(hex code) #



22
23
24
# File 'lib/ambling/stock.rb', line 22

def text_size
  @text_size
end