Class: Ambling::Stock::Settings::Charts::Chart::Comparing
- Inherits:
-
Object
- Object
- Ambling::Stock::Settings::Charts::Chart::Comparing
- 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
-
#alpha ⇒ Object
- false
-
(true / false) whether to smooth line or not #.
-
#base_date ⇒ Object
- 0
-
(Number) with of graph line of comparing data sets #.
-
#dashed ⇒ Object
- false
-
(true / false) whether the comparing graph should be use the same color as the one you are comparing to.
-
#recalculate ⇒ Object
- false
-
(true / false) If the <recalculate> setting is set to true, the chart recalculates values to percents.
-
#recalculate_from_start ⇒ Object
-
(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.
-
-
#smoothed ⇒ Object
Returns the value of attribute smoothed.
-
#use_graph_color ⇒ Object
- 100
-
(0 - 100) opacity of graph line of comparing data sets #.
-
#width ⇒ Object
- false
-
(true / false) whether the comparing graph should be dashed #.
Method Summary
Methods included from Base
#build_xml, #initialize, #populate, #to_xml
Instance Attribute Details
#alpha ⇒ Object
- false
-
(true / false) whether to smooth line or not #
862 863 864 |
# File 'lib/ambling/stock.rb', line 862 def alpha @alpha end |
#base_date ⇒ Object
- 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 |
#dashed ⇒ Object
- 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 |
#recalculate ⇒ Object
- 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_start ⇒ Object
-
(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 |
#smoothed ⇒ Object
Returns the value of attribute smoothed.
866 867 868 |
# File 'lib/ambling/stock.rb', line 866 def smoothed @smoothed end |
#use_graph_color ⇒ Object
- 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 |
#width ⇒ Object
- false
-
(true / false) whether the comparing graph should be dashed #
849 850 851 |
# File 'lib/ambling/stock.rb', line 849 def width @width end |