Class: Ambling::Line::Settings::Legend

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

Overview

LEGEND

Defined Under Namespace

Classes: Key, Values

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

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/line.rb', line 1088

def align
  @align
end

#alphaObject

0

(0 - 100) background alpha



1038
1039
1040
# File 'lib/ambling/line.rb', line 1038

def alpha
  @alpha
end

#border_alphaObject

0

(0 - 100) border alpha



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

def border_alpha
  @border_alpha
end

#border_colorObject

#000000

(hex color code) border color



1043
1044
1045
# File 'lib/ambling/line.rb', line 1043

def border_color
  @border_color
end

#colorObject

#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

#enabledObject

true

(true / false)



1008
1009
1010
# File 'lib/ambling/line.rb', line 1008

def enabled
  @enabled
end

#graph_on_offObject

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

#keyObject

KEY (the color box near every legend entry)



1093
1094
1095
# File 'lib/ambling/line.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)



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

def margins
  @margins
end

#max_columnsObject

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

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

#spacingObject

10

(Number) vertical and horizontal gap between legend entries



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

def spacing
  @spacing
end

#text_colorObject

text_color

(hex color code)



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

def text_color
  @text_color
end

#text_color_hoverObject

#BBBB00

(hex color code)



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

def text_color_hover
  @text_color_hover
end

#text_sizeObject

text_size

(Number)



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

def text_size
  @text_size
end

#valuesObject

VALUES



1098
1099
1100
# File 'lib/ambling/line.rb', line 1098

def values
  @values
end

#widthObject

(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

#xObject

(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

#yObject

(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