Class: Ambling::Xy::Settings::Legend
- Inherits:
-
Object
- Object
- Ambling::Xy::Settings::Legend
- Includes:
- Base
- Defined in:
- lib/ambling/xy.rb
Overview
LEGEND
Defined Under Namespace
Classes: Key
Constant Summary collapse
- VALUES =
[:enabled,:x,:y,:width,:max_columns,:color,:alpha,:border_color,:border_alpha,:text_color,:text_size,:spacing,:margins,:reverse_order,:align,:key]
Instance Attribute Summary collapse
-
#align ⇒ Object
- left
-
(left / center / right) alignment of legend entries.
-
#alpha ⇒ Object
- 0
-
(0 - 100) background alpha.
-
#border_alpha ⇒ Object
- 0
-
(0 - 100) border alpha.
-
#border_color ⇒ Object
- #000000
-
(hex color code) border color.
-
#color ⇒ Object
- #FFFFFF
-
(hex color code) background color.
-
#enabled ⇒ Object
- true
-
(true / false).
-
#key ⇒ Object
KEY (the color box near every legend entry).
-
#margins ⇒ Object
- 0
-
(Number) legend margins (space between legend border and legend entries, recommended to use only if legend border is visible or background color is different from chart area background color).
-
#max_columns ⇒ Object
-
(Number) the maximum number of columns in the legend.
-
#reverse_order ⇒ Object
- false
-
(true / false) whether to sort legend entries in a reverse order.
-
#spacing ⇒ Object
- 10
-
(Number) vertical and horizontal gap between legend entries.
-
#text_color ⇒ Object
- text_color
-
(hex color code).
-
#text_size ⇒ Object
- text_size
-
(Number).
-
#width ⇒ Object
-
(Number / Number%) if empty, will be equal to plot area width.
-
#x ⇒ Object
-
(Number / Number% / !Number) if empty, will be equal to left margin.
-
#y ⇒ Object
-
(Number / Number% / !Number) if empty, will be below plot area.
Method Summary
Methods included from Base
#build_xml, #initialize, #populate, #to_xml
Instance Attribute Details
#align ⇒ Object
- left
-
(left / center / right) alignment of legend entries
1088 1089 1090 |
# File 'lib/ambling/xy.rb', line 1088 def align @align end |
#alpha ⇒ Object
- 0
-
(0 - 100) background alpha
1048 1049 1050 |
# File 'lib/ambling/xy.rb', line 1048 def alpha @alpha end |
#border_alpha ⇒ Object
- 0
-
(0 - 100) border alpha
1058 1059 1060 |
# File 'lib/ambling/xy.rb', line 1058 def border_alpha @border_alpha end |
#border_color ⇒ Object
- #000000
-
(hex color code) border color
1053 1054 1055 |
# File 'lib/ambling/xy.rb', line 1053 def border_color @border_color end |
#color ⇒ Object
- #FFFFFF
-
(hex color code) background color. Separate color codes with comas for gradient
1043 1044 1045 |
# File 'lib/ambling/xy.rb', line 1043 def color @color end |
#enabled ⇒ Object
- true
-
(true / false)
1018 1019 1020 |
# File 'lib/ambling/xy.rb', line 1018 def enabled @enabled end |
#key ⇒ Object
KEY (the color box near every legend entry)
1093 1094 1095 |
# File 'lib/ambling/xy.rb', line 1093 def key @key end |
#margins ⇒ Object
- 0
-
(Number) legend margins (space between legend border and legend entries, recommended to use only if legend border is visible or background color is different from chart area background color)
1078 1079 1080 |
# File 'lib/ambling/xy.rb', line 1078 def margins @margins end |
#max_columns ⇒ Object
-
(Number) the maximum number of columns in the legend
1038 1039 1040 |
# File 'lib/ambling/xy.rb', line 1038 def max_columns @max_columns end |
#reverse_order ⇒ Object
- false
-
(true / false) whether to sort legend entries in a reverse order
1083 1084 1085 |
# File 'lib/ambling/xy.rb', line 1083 def reverse_order @reverse_order end |
#spacing ⇒ Object
- 10
-
(Number) vertical and horizontal gap between legend entries
1073 1074 1075 |
# File 'lib/ambling/xy.rb', line 1073 def spacing @spacing end |
#text_color ⇒ Object
- text_color
-
(hex color code)
1063 1064 1065 |
# File 'lib/ambling/xy.rb', line 1063 def text_color @text_color end |
#text_size ⇒ Object
- text_size
-
(Number)
1068 1069 1070 |
# File 'lib/ambling/xy.rb', line 1068 def text_size @text_size end |
#width ⇒ Object
-
(Number / Number%) if empty, will be equal to plot area width
1033 1034 1035 |
# File 'lib/ambling/xy.rb', line 1033 def width @width end |
#x ⇒ Object
-
(Number / Number% / !Number) if empty, will be equal to left margin
1023 1024 1025 |
# File 'lib/ambling/xy.rb', line 1023 def x @x end |
#y ⇒ Object
-
(Number / Number% / !Number) if empty, will be below plot area
1028 1029 1030 |
# File 'lib/ambling/xy.rb', line 1028 def y @y end |