Class: Ambling::Xy::Settings::Legend

Inherits:
Object
  • Object
show all
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

Method Summary

Methods included from Base

#build_xml, #initialize, #populate, #to_xml

Instance Attribute Details

#alignObject

left

(left / center / right) alignment of legend entries



1088
1089
1090
# File 'lib/ambling/xy.rb', line 1088

def align
  @align
end

#alphaObject

0

(0 - 100) background alpha



1048
1049
1050
# File 'lib/ambling/xy.rb', line 1048

def alpha
  @alpha
end

#border_alphaObject

0

(0 - 100) border alpha



1058
1059
1060
# File 'lib/ambling/xy.rb', line 1058

def border_alpha
  @border_alpha
end

#border_colorObject

#000000

(hex color code) border color



1053
1054
1055
# File 'lib/ambling/xy.rb', line 1053

def border_color
  @border_color
end

#colorObject

#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

#enabledObject

true

(true / false)



1018
1019
1020
# File 'lib/ambling/xy.rb', line 1018

def enabled
  @enabled
end

#keyObject

KEY (the color box near every legend entry)



1093
1094
1095
# File 'lib/ambling/xy.rb', line 1093

def key
  @key
end

#marginsObject

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_columnsObject

(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_orderObject

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

#spacingObject

10

(Number) vertical and horizontal gap between legend entries



1073
1074
1075
# File 'lib/ambling/xy.rb', line 1073

def spacing
  @spacing
end

#text_colorObject

text_color

(hex color code)



1063
1064
1065
# File 'lib/ambling/xy.rb', line 1063

def text_color
  @text_color
end

#text_sizeObject

text_size

(Number)



1068
1069
1070
# File 'lib/ambling/xy.rb', line 1068

def text_size
  @text_size
end

#widthObject

(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

#xObject

(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

#yObject

(Number / Number% / !Number) if empty, will be below plot area



1028
1029
1030
# File 'lib/ambling/xy.rb', line 1028

def y
  @y
end