Class: Ambling::Stock::Settings::DataSets::DataSet

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

Overview

(text) data set title is displayed in a drop down for selecting data set, in a

list box for comparing one data set with another and may be displayed in a chart's header #

Defined Under Namespace

Classes: Csv

Constant Summary collapse

VALUES =
[:title,:short,:color,:description,:file_name,:events_file_name,:main_drop_down,:compare_list_box,:csv,:events]
ATTRIBUTES =
[:did]

Instance Attribute Summary collapse

Method Summary

Methods included from Base

#build_xml, #initialize, #populate, #to_xml

Instance Attribute Details

#colorObject

(text) description can be displayed in chart’s header. you can use some html tags #



255
256
257
# File 'lib/ambling/stock.rb', line 255

def color
  @color
end

#compare_list_boxObject

configuration of data csv file. Using these settings you can make the chart to accept

almost any configuration of csv file #


287
288
289
# File 'lib/ambling/stock.rb', line 287

def compare_list_box
  @compare_list_box
end

#csvObject

false

(true / false) If this is set to false, then the oldest date should be on the

top and increase when going down. If you newest date is on the top, set this to "false" #


292
293
294
# File 'lib/ambling/stock.rb', line 292

def csv
  @csv
end

#descriptionObject

(file name) file name of your data file. You can use any extension, generate this

data dynamicaly. The output of this file should be data in CSV format #


260
261
262
# File 'lib/ambling/stock.rb', line 260

def description
  @description
end

#didObject

xml attribute



301
302
303
# File 'lib/ambling/stock.rb', line 301

def did
  @did
end

#eventsObject

Returns the value of attribute events.



296
297
298
# File 'lib/ambling/stock.rb', line 296

def events
  @events
end

#events_file_nameObject

true

(true / false) if you have more then one data set, the user can switch between them using drop down for selecting data sets. If you don;t want this data set to appear in this dropdown, set this setting to “false”. “selected” attribute defines whether you want this data set to be selected when the chart is loaded (if no data sets are selected, then the first data set will be) #



275
276
277
# File 'lib/ambling/stock.rb', line 275

def events_file_name
  @events_file_name
end

#file_nameObject

(file name) Using events you can have custom bullets with descriptions on your charts.

Event properties are defined separately for every chart. Check examples/events/ example. 
You can also include the events directly to this settings file. If you do this, the events
from the file will not be loaded. #


267
268
269
# File 'lib/ambling/stock.rb', line 267

def file_name
  @file_name
end
true

(true / false) if you have more then one data set, the user can compare selected data set with others. If you don’t want this data set to appear in a “compare” list box, set this setting to false. “selected” attribute defines whether you want this data set to be selected for comparing when the chart is loaded #



282
283
284
# File 'lib/ambling/stock.rb', line 282

def main_drop_down
  @main_drop_down
end

#shortObject

(hex code) this color will be used for chart’s graphs, in case you don’t set different

color in graphs' settings. The color keys in the drop down, list box and in the legend will 
use this color. In case you don't set any color here, the colors from this array will be used:
#ff3300,#3366cc,#00cc33,#ffcc00,#ff0099,#003366,#669933,#cc99cc,#333333,#99ff00,[random color]  #


251
252
253
# File 'lib/ambling/stock.rb', line 251

def short
  @short
end

#titleObject

(text) short title can be displayed in the legend of a chart #



244
245
246
# File 'lib/ambling/stock.rb', line 244

def title
  @title
end