Class: Ambling::Column::Settings::Legend

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/ambling/column.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



882
883
884
# File 'lib/ambling/column.rb', line 882

def align
  @align
end

#alphaObject

0

(0 - 100) background alpha



842
843
844
# File 'lib/ambling/column.rb', line 842

def alpha
  @alpha
end

#border_alphaObject

0

(0 - 100) border alpha



852
853
854
# File 'lib/ambling/column.rb', line 852

def border_alpha
  @border_alpha
end

#border_colorObject

#000000

(hex color code) border color



847
848
849
# File 'lib/ambling/column.rb', line 847

def border_color
  @border_color
end

#colorObject

#FFFFFF

(hex color code) background color. Separate color codes with comas for gradient



837
838
839
# File 'lib/ambling/column.rb', line 837

def color
  @color
end

#enabledObject

true

(true / false)



812
813
814
# File 'lib/ambling/column.rb', line 812

def enabled
  @enabled
end

#keyObject

KEY (the color box near every legend entry)



887
888
889
# File 'lib/ambling/column.rb', line 887

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)



872
873
874
# File 'lib/ambling/column.rb', line 872

def margins
  @margins
end

#max_columnsObject

(Number) the maximum number of columns in the legend



832
833
834
# File 'lib/ambling/column.rb', line 832

def max_columns
  @max_columns
end

#reverse_orderObject

false

(true / false) whether to sort legend entries in a reverse order



877
878
879
# File 'lib/ambling/column.rb', line 877

def reverse_order
  @reverse_order
end

#spacingObject

10

(Number) vertical and horizontal gap between legend entries



867
868
869
# File 'lib/ambling/column.rb', line 867

def spacing
  @spacing
end

#text_colorObject

text_color

(hex color code)



857
858
859
# File 'lib/ambling/column.rb', line 857

def text_color
  @text_color
end

#text_sizeObject

text_size

(Number)



862
863
864
# File 'lib/ambling/column.rb', line 862

def text_size
  @text_size
end

#widthObject

(Number / Number%) if empty, will be equal to plot area width



827
828
829
# File 'lib/ambling/column.rb', line 827

def width
  @width
end

#xObject

(Number / Number% / !Number) if empty, will be equal to left margin



817
818
819
# File 'lib/ambling/column.rb', line 817

def x
  @x
end

#yObject

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



822
823
824
# File 'lib/ambling/column.rb', line 822

def y
  @y
end