Class: Ambling::Line::Settings
- Inherits:
-
Object
- Object
- Ambling::Line::Settings
- Includes:
- Base
- Defined in:
- lib/ambling/line.rb
Overview
“!” before x or y position (for example: <x>!20</x>) means that the coordinate will be calculated from the right side or the bottom
Defined Under Namespace
Classes: Axes, Background, Balloon, ContextMenu, ErrorMessages, ExportAsImage, Graphs, Grid, Guides, Help, Indicator, Labels, Legend, PlotArea, Scroller, Strings, Values, VerticalLines, ZoomOutButton
Constant Summary collapse
- VALUES =
[:data_type,:csv_separator,:skip_rows,:font,:text_size,:text_color,:decimals_separator,:thousands_separator,:digits_after_decimal,:scientific_min,:scientific_max,:redraw,:reload_data_interval,:preloader_on_reload,:add_time_stamp,:precision,:connect,:hide_bullets_count,:link_target,:start_on_axis,:colors,:rescale_on_hide,:js_enabled,:background,:plot_area,:scroller,:grid,:values,:axes,:indicator,:balloon,:legend,:vertical_lines,:zoom_out_button,:help,:export_as_image,:error_messages,:strings,:context_menu,:labels,:graphs,:guides]
Instance Attribute Summary collapse
-
#add_time_stamp ⇒ Object
- false
-
(true / false) if true, a unique number will be added every time flash loads data.
-
#axes ⇒ Object
axes.
-
#background ⇒ Object
BACKGROUND.
-
#balloon ⇒ Object
BALLOON.
-
#colors ⇒ Object
- #FF0000,#0000FF,#00FF00,#FF9900,#CC00CC,#00CCCC,#33FF00,#990000,#000066,#555555
-
Colors of graphs.
-
#connect ⇒ Object
- false
-
(true / false) whether to connect points if y data is missing.
-
#context_menu ⇒ Object
<menu function_name=“printChart” title=“Print chart”></menu>.
-
#csv_separator ⇒ Object
- ;
-
(string) csv file data separator (you need it only if you are using csv file for your data).
-
#data_type ⇒ Object
- xml
-
(xml / csv).
-
#decimals_separator ⇒ Object
- ,
-
(string) decimal separator.
-
#digits_after_decimal ⇒ Object
-
(Number) if your value has less digits after decimal then is set here, zeroes will be added.
-
#error_messages ⇒ Object
“error_messages” settings will be applied for all error messages except the one which is showed if settings file wasn’t found.
-
#export_as_image ⇒ Object
export_as_image feature works only on a web server.
-
#font ⇒ Object
- Arial
-
(font name) use device fonts, such as Arial, Times New Roman, Tahoma, Verdana…
-
#graphs ⇒ Object
if graph settings are defined both here and in data file, the ones from data file are used.
-
#grid ⇒ Object
GRID.
-
#guides ⇒ Object
guides are straight lines drawn through all plot area at a give value.
-
#help ⇒ Object
HELP button and balloon.
-
#hide_bullets_count ⇒ Object
-
(Number) if there are more then hideBulletsCount points on the screen, bullets can be hidden, to avoid mess.
-
#indicator ⇒ Object
INDICATOR.
-
#js_enabled ⇒ Object
- 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 and will disable the security warning message which appears when opening the chart from hard drive.
-
#labels ⇒ Object
labels can also be added in data xml file, using exactly the same structure like it is here.
-
#legend ⇒ Object
LEGEND.
-
#link_target ⇒ Object
-
(_blank, _top …).
-
#plot_area ⇒ Object
PLOT AREA (the area between axes).
-
#precision ⇒ Object
- 2
-
(Number) shows how many numbers should be shown after comma for calculated values (percents, used only in stacked charts).
-
#preloader_on_reload ⇒ Object
- false
-
(true / false) Whether to show preloaded when data or settings are reloaded.
-
#redraw ⇒ Object
Legend, buttons labels will not be repositioned if you set your x and y values for these objects.
-
#reload_data_interval ⇒ Object
- 0
-
(Number) how often data should be reloaded (time in seconds) If you are using this feature I strongly recommend to turn off zoom function (set <zoomable>false</zoomable>).
-
#rescale_on_hide ⇒ Object
- true
-
(true/false) When you show or hide graphs, the chart recalculates min and max values (rescales the chart).
-
#scientific_max ⇒ Object
- 1000000000000000
-
If absolute value of your number is equal or bigger then scientific_max, this number will be formatted using scientific notation, for example: 15000000000000000 -> 1.5e16.
-
#scientific_min ⇒ Object
- 0.000001
-
If absolute value of your number is equal or less then scientific_min, this number will be formatted using scientific notation, for example: 0.0000023 -> 2.3e-6.
-
#scroller ⇒ Object
Returns the value of attribute scroller.
-
#skip_rows ⇒ Object
- 0
-
(Number) if you are using csv data type, you can set the number of rows which should be skipped here.
-
#start_on_axis ⇒ Object
- true
-
(true / false) if set to false, graph is moved 1/2 of one series interval from Y axis.
-
#strings ⇒ Object
Returns the value of attribute strings.
-
#text_color ⇒ Object
- #000000
-
(hex color code) main text color.
-
#text_size ⇒ Object
- 11
-
(Number) text size of all texts.
-
#thousands_separator ⇒ Object
-
(string) thousand separator.
-
#values ⇒ Object
VALUES.
-
#vertical_lines ⇒ Object
line chart can also display vertical lines/columns (set <vertical_lines>true</vertical_lines> in graph settings for that).
-
#zoom_out_button ⇒ Object
Returns the value of attribute zoom_out_button.
Method Summary
Methods included from Base
#build_xml, #initialize, #populate, #to_xml
Instance Attribute Details
#add_time_stamp ⇒ Object
- false
-
(true / false) if true, a unique number will be added every time flash loads data. Mainly this feature is useful if you set reload _data_interval >0
86 87 88 |
# File 'lib/ambling/line.rb', line 86 def add_time_stamp @add_time_stamp end |
#axes ⇒ Object
axes
156 157 158 |
# File 'lib/ambling/line.rb', line 156 def axes @axes end |
#background ⇒ Object
BACKGROUND
131 132 133 |
# File 'lib/ambling/line.rb', line 131 def background @background end |
#balloon ⇒ Object
BALLOON
166 167 168 |
# File 'lib/ambling/line.rb', line 166 def balloon @balloon end |
#colors ⇒ Object
- #FF0000,#0000FF,#00FF00,#FF9900,#CC00CC,#00CCCC,#33FF00,#990000,#000066,#555555
-
Colors of graphs. if the graph color is not set, color from this array will be used
116 117 118 |
# File 'lib/ambling/line.rb', line 116 def colors @colors end |
#connect ⇒ Object
- false
-
(true / false) whether to connect points if y data is missing
96 97 98 |
# File 'lib/ambling/line.rb', line 96 def connect @connect end |
#context_menu ⇒ Object
<menu function_name=“printChart” title=“Print chart”></menu>
206 207 208 |
# File 'lib/ambling/line.rb', line 206 def @context_menu end |
#csv_separator ⇒ Object
- ;
-
(string) csv file data separator (you need it only if you are using csv file for your data)
21 22 23 |
# File 'lib/ambling/line.rb', line 21 def csv_separator @csv_separator end |
#data_type ⇒ Object
- xml
-
(xml / csv)
16 17 18 |
# File 'lib/ambling/line.rb', line 16 def data_type @data_type end |
#decimals_separator ⇒ Object
- ,
-
(string) decimal separator. Note, that this is for displaying data only. Decimals in data xml file must be separated with dot
46 47 48 |
# File 'lib/ambling/line.rb', line 46 def decimals_separator @decimals_separator end |
#digits_after_decimal ⇒ Object
-
(Number) if your value has less digits after decimal then is set here, zeroes will be added
56 57 58 |
# File 'lib/ambling/line.rb', line 56 def digits_after_decimal @digits_after_decimal end |
#error_messages ⇒ Object
“error_messages” settings will be applied for all error messages except the one which is showed if settings file wasn’t found
196 197 198 |
# File 'lib/ambling/line.rb', line 196 def @error_messages end |
#export_as_image ⇒ Object
export_as_image feature works only on a web server
191 192 193 |
# File 'lib/ambling/line.rb', line 191 def export_as_image @export_as_image end |
#font ⇒ Object
- Arial
-
(font name) use device fonts, such as Arial, Times New Roman, Tahoma, Verdana…
31 32 33 |
# File 'lib/ambling/line.rb', line 31 def font @font end |
#graphs ⇒ Object
if graph settings are defined both here and in data file, the ones from data file are used
216 217 218 |
# File 'lib/ambling/line.rb', line 216 def graphs @graphs end |
#grid ⇒ Object
GRID
146 147 148 |
# File 'lib/ambling/line.rb', line 146 def grid @grid end |
#guides ⇒ Object
guides are straight lines drawn through all plot area at a give value. Can also be filled with color
221 222 223 |
# File 'lib/ambling/line.rb', line 221 def guides @guides end |
#help ⇒ Object
HELP button and balloon
186 187 188 |
# File 'lib/ambling/line.rb', line 186 def help @help end |
#hide_bullets_count ⇒ Object
-
(Number) if there are more then hideBulletsCount points on the screen, bullets can be hidden, to avoid mess. Leave empty, or 0 to show bullets all the time. This rule doesn’t influence if custom bullet is defined near y value, in data file
101 102 103 |
# File 'lib/ambling/line.rb', line 101 def hide_bullets_count @hide_bullets_count end |
#indicator ⇒ Object
INDICATOR
161 162 163 |
# File 'lib/ambling/line.rb', line 161 def indicator @indicator end |
#js_enabled ⇒ Object
- 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 and will disable the security warning message which appears when opening the chart from hard drive.
126 127 128 |
# File 'lib/ambling/line.rb', line 126 def js_enabled @js_enabled end |
#labels ⇒ Object
labels can also be added in data xml file, using exactly the same structure like it is here
211 212 213 |
# File 'lib/ambling/line.rb', line 211 def labels @labels end |
#legend ⇒ Object
LEGEND
171 172 173 |
# File 'lib/ambling/line.rb', line 171 def legend @legend end |
#link_target ⇒ Object
-
(_blank, _top …)
106 107 108 |
# File 'lib/ambling/line.rb', line 106 def link_target @link_target end |
#plot_area ⇒ Object
PLOT AREA (the area between axes)
136 137 138 |
# File 'lib/ambling/line.rb', line 136 def plot_area @plot_area end |
#precision ⇒ Object
- 2
-
(Number) shows how many numbers should be shown after comma for calculated values (percents, used only in stacked charts)
91 92 93 |
# File 'lib/ambling/line.rb', line 91 def precision @precision end |
#preloader_on_reload ⇒ Object
- false
-
(true / false) Whether to show preloaded when data or settings are reloaded
81 82 83 |
# File 'lib/ambling/line.rb', line 81 def preloader_on_reload @preloader_on_reload end |
#redraw ⇒ Object
Legend, buttons labels will not be repositioned if you set your x and y values for these objects
71 72 73 |
# File 'lib/ambling/line.rb', line 71 def redraw @redraw end |
#reload_data_interval ⇒ Object
- 0
-
(Number) how often data should be reloaded (time in seconds) If you are using this feature I strongly recommend to turn off zoom function (set <zoomable>false</zoomable>)
76 77 78 |
# File 'lib/ambling/line.rb', line 76 def reload_data_interval @reload_data_interval end |
#rescale_on_hide ⇒ Object
- true
-
(true/false) When you show or hide graphs, the chart recalculates min and max values (rescales the chart). If you don’t want this, set this to false.
121 122 123 |
# File 'lib/ambling/line.rb', line 121 def rescale_on_hide @rescale_on_hide end |
#scientific_max ⇒ Object
- 1000000000000000
-
If absolute value of your number is equal or bigger then scientific_max, this number will be formatted using scientific notation, for example: 15000000000000000 -> 1.5e16
66 67 68 |
# File 'lib/ambling/line.rb', line 66 def scientific_max @scientific_max end |
#scientific_min ⇒ Object
- 0.000001
-
If absolute value of your number is equal or less then scientific_min, this number will be formatted using scientific notation, for example: 0.0000023 -> 2.3e-6
61 62 63 |
# File 'lib/ambling/line.rb', line 61 def scientific_min @scientific_min end |
#scroller ⇒ Object
Returns the value of attribute scroller.
141 142 143 |
# File 'lib/ambling/line.rb', line 141 def scroller @scroller end |
#skip_rows ⇒ Object
- 0
-
(Number) if you are using csv data type, you can set the number of rows which should be skipped here
26 27 28 |
# File 'lib/ambling/line.rb', line 26 def skip_rows @skip_rows end |
#start_on_axis ⇒ Object
- true
-
(true / false) if set to false, graph is moved 1/2 of one series interval from Y axis
111 112 113 |
# File 'lib/ambling/line.rb', line 111 def start_on_axis @start_on_axis end |
#strings ⇒ Object
Returns the value of attribute strings.
201 202 203 |
# File 'lib/ambling/line.rb', line 201 def strings @strings end |
#text_color ⇒ Object
- #000000
-
(hex color code) main text color. Every text color can be set individually in the settings below
41 42 43 |
# File 'lib/ambling/line.rb', line 41 def text_color @text_color end |
#text_size ⇒ Object
- 11
-
(Number) text size of all texts. Every text size can be set individually in the settings below
36 37 38 |
# File 'lib/ambling/line.rb', line 36 def text_size @text_size end |
#thousands_separator ⇒ Object
-
(string) thousand separator. use “none” if you don’t want to separate
51 52 53 |
# File 'lib/ambling/line.rb', line 51 def thousands_separator @thousands_separator end |
#values ⇒ Object
VALUES
151 152 153 |
# File 'lib/ambling/line.rb', line 151 def values @values end |
#vertical_lines ⇒ Object
line chart can also display vertical lines/columns (set <vertical_lines>true</vertical_lines> in graph settings for that). If you also set <line_alpha>0</line_alpha> your line chart will become column chart
176 177 178 |
# File 'lib/ambling/line.rb', line 176 def vertical_lines @vertical_lines end |
#zoom_out_button ⇒ Object
Returns the value of attribute zoom_out_button.
181 182 183 |
# File 'lib/ambling/line.rb', line 181 def @zoom_out_button end |