Class: Ambling::Line::Settings::Legend
- Inherits:
-
Object
- Object
- Ambling::Line::Settings::Legend
- Includes:
- Base
- Defined in:
- lib/ambling/line.rb
Overview
LEGEND
Defined Under Namespace
Constant Summary collapse
- VALUES =
[:enabled,:x,:y,:width,:max_columns,:color,:alpha,:border_color,:border_alpha,:text_color,:text_color_hover,:text_size,:spacing,:margins,:graph_on_off,:reverse_order,:align,:key,:values]
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).
-
#graph_on_off ⇒ Object
- true
-
(true / false) if true, color box gains “checkbox” function - it is possible to make graphs visible/invisible by clicking on this checkbox.
-
#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_color_hover ⇒ Object
- #BBBB00
-
(hex color code).
-
#text_size ⇒ Object
- text_size
-
(Number).
-
#values ⇒ Object
VALUES.
-
#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 20px below x axis values.
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/line.rb', line 1088 def align @align end |
#alpha ⇒ Object
- 0
-
(0 - 100) background alpha
1038 1039 1040 |
# File 'lib/ambling/line.rb', line 1038 def alpha @alpha end |
#border_alpha ⇒ Object
- 0
-
(0 - 100) border alpha
1048 1049 1050 |
# File 'lib/ambling/line.rb', line 1048 def border_alpha @border_alpha end |
#border_color ⇒ Object
- #000000
-
(hex color code) border color
1043 1044 1045 |
# File 'lib/ambling/line.rb', line 1043 def border_color @border_color end |
#color ⇒ Object
- #FFFFFF
-
(hex color code) background color. Separate color codes with comas for gradient
1033 1034 1035 |
# File 'lib/ambling/line.rb', line 1033 def color @color end |
#enabled ⇒ Object
- true
-
(true / false)
1008 1009 1010 |
# File 'lib/ambling/line.rb', line 1008 def enabled @enabled end |
#graph_on_off ⇒ Object
- true
-
(true / false) if true, color box gains “checkbox” function - it is possible to make graphs visible/invisible by clicking on this checkbox
1078 1079 1080 |
# File 'lib/ambling/line.rb', line 1078 def graph_on_off @graph_on_off end |
#key ⇒ Object
KEY (the color box near every legend entry)
1093 1094 1095 |
# File 'lib/ambling/line.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)
1073 1074 1075 |
# File 'lib/ambling/line.rb', line 1073 def margins @margins end |
#max_columns ⇒ Object
-
(Number) the maximum number of columns in the legend
1028 1029 1030 |
# File 'lib/ambling/line.rb', line 1028 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/line.rb', line 1083 def reverse_order @reverse_order end |
#spacing ⇒ Object
- 10
-
(Number) vertical and horizontal gap between legend entries
1068 1069 1070 |
# File 'lib/ambling/line.rb', line 1068 def spacing @spacing end |
#text_color ⇒ Object
- text_color
-
(hex color code)
1053 1054 1055 |
# File 'lib/ambling/line.rb', line 1053 def text_color @text_color end |
#text_color_hover ⇒ Object
- #BBBB00
-
(hex color code)
1058 1059 1060 |
# File 'lib/ambling/line.rb', line 1058 def text_color_hover @text_color_hover end |
#text_size ⇒ Object
- text_size
-
(Number)
1063 1064 1065 |
# File 'lib/ambling/line.rb', line 1063 def text_size @text_size end |
#values ⇒ Object
VALUES
1098 1099 1100 |
# File 'lib/ambling/line.rb', line 1098 def values @values end |
#width ⇒ Object
-
(Number / Number%) if empty, will be equal to plot area width
1023 1024 1025 |
# File 'lib/ambling/line.rb', line 1023 def width @width end |
#x ⇒ Object
-
(Number / Number% / !Number) if empty, will be equal to left margin
1013 1014 1015 |
# File 'lib/ambling/line.rb', line 1013 def x @x end |
#y ⇒ Object
-
(Number / Number% / !Number) if empty, will be 20px below x axis values
1018 1019 1020 |
# File 'lib/ambling/line.rb', line 1018 def y @y end |