Class: Ambling::Stock::Settings::Charts::Chart::Legend

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

Overview

true

(true / false) whether to show legend or not #

Constant Summary collapse

VALUES =
[:enabled,:text_size,:text_color,:value_color,:positive_color,:negative_color,:show_date,:hide_date_on_period,:key_size,:key_type,:graph_on_off]

Instance Attribute Summary collapse

Method Summary

Methods included from Base

#build_xml, #initialize, #populate, #to_xml

Instance Attribute Details

#enabledObject

text_size

(Number) #



774
775
776
# File 'lib/ambling/stock.rb', line 774

def enabled
  @enabled
end

#graph_on_offObject

Returns the value of attribute graph_on_off.



819
820
821
# File 'lib/ambling/stock.rb', line 819

def graph_on_off
  @graph_on_off
end

#hide_date_on_periodObject

10

(Number) the size of legend key #



806
807
808
# File 'lib/ambling/stock.rb', line 806

def hide_date_on_period
  @hide_date_on_period
end

#key_sizeObject

round

(round / square / line) the shape of legend key #



810
811
812
# File 'lib/ambling/stock.rb', line 810

def key_size
  @key_size
end

#key_typeObject

true

(true / false) Whether it is possible to turn show/hide the graph by clicking on

the legend key #


815
816
817
# File 'lib/ambling/stock.rb', line 815

def key_type
  @key_type
end

#negative_colorObject

false

(true / false) whether to show active date in the legend. If you have more then one chart it would be wise to set only one chart to show this date #



797
798
799
# File 'lib/ambling/stock.rb', line 797

def negative_color
  @negative_color
end

#positive_colorObject

#CC0000

(hex code) If percent change or value change is displayed in the legend, and

the change is negative this color will be used #


792
793
794
# File 'lib/ambling/stock.rb', line 792

def positive_color
  @positive_color
end

#show_dateObject

false

(true / false) If you don’t want the date to be shown when the mouse is not over the plot area, set this to true #



802
803
804
# File 'lib/ambling/stock.rb', line 802

def show_date
  @show_date
end

#text_colorObject

legend.text_color

(hex code) Values in the legend can use different color #



782
783
784
# File 'lib/ambling/stock.rb', line 782

def text_color
  @text_color
end

#text_sizeObject

text_color

(hex code) #



778
779
780
# File 'lib/ambling/stock.rb', line 778

def text_size
  @text_size
end

#value_colorObject

#00CC00

(hex code) If percent change or value change is displayed in the legend, and

the change is positive this color will be used #


787
788
789
# File 'lib/ambling/stock.rb', line 787

def value_color
  @value_color
end