Class: Ambling::Stock::Settings::Charts::Chart::Comparing

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

Overview

true

(true / false) in stock charts, when comparing one stock with another it is used

to recalculate chart values to percents, as the difference between values of different
stocks can be very big. However, if you compare close values, for example unique visitors 
with new visitors, it would be better not to recalculate values #

Constant Summary collapse

VALUES =
[:recalculate,:recalculate_from_start,:base_date,:width,:dashed,:use_graph_color,:alpha,:smoothed]

Instance Attribute Summary collapse

Method Summary

Methods included from Base

#build_xml, #initialize, #populate, #to_xml

Instance Attribute Details

#alphaObject

false

(true / false) whether to smooth line or not #



862
863
864
# File 'lib/ambling/stock.rb', line 862

def alpha
  @alpha
end

#base_dateObject

0

(Number) with of graph line of comparing data sets #



845
846
847
# File 'lib/ambling/stock.rb', line 845

def base_date
  @base_date
end

#dashedObject

false

(true / false) whether the comparing graph should be use the same color as the one you are comparing to. This makes sense if you set <dashed>true</dashed> #



854
855
856
# File 'lib/ambling/stock.rb', line 854

def dashed
  @dashed
end

#recalculateObject

false

(true / false) If the <recalculate> setting is set to true, the chart recalculates values to percents. If this setting is set to false, then it takes the first value of a selected period as a base value. If you set this setting to “true”, the first value of a graph will be used as base value. #



835
836
837
# File 'lib/ambling/stock.rb', line 835

def recalculate
  @recalculate
end

#recalculate_from_startObject

(date in date format, specified in data set settings) You can set the base date,

using which value the data will be recalculated when comparing data sets. This might be useful for
structured products. #


841
842
843
# File 'lib/ambling/stock.rb', line 841

def recalculate_from_start
  @recalculate_from_start
end

#smoothedObject

Returns the value of attribute smoothed.



866
867
868
# File 'lib/ambling/stock.rb', line 866

def smoothed
  @smoothed
end

#use_graph_colorObject

100

(0 - 100) opacity of graph line of comparing data sets #



858
859
860
# File 'lib/ambling/stock.rb', line 858

def use_graph_color
  @use_graph_color
end

#widthObject

false

(true / false) whether the comparing graph should be dashed #



849
850
851
# File 'lib/ambling/stock.rb', line 849

def width
  @width
end