Class: Ambling::Pie::Settings::Legend

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

Overview

LEGEND

Defined Under Namespace

Classes: Key, Values

Constant Summary collapse

VALUES =
[:enabled,:x,:y,:width,:color,:max_columns,:alpha,:border_color,:border_alpha,:text_color,:text_size,:spacing,:margins,: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



566
567
568
# File 'lib/ambling/pie.rb', line 566

def align
  @align
end

#alphaObject

0

(0 - 100) background alpha



526
527
528
# File 'lib/ambling/pie.rb', line 526

def alpha
  @alpha
end

#border_alphaObject

0

(0 - 100) border alpha



536
537
538
# File 'lib/ambling/pie.rb', line 536

def border_alpha
  @border_alpha
end

#border_colorObject

#000000

(hex color code) border color



531
532
533
# File 'lib/ambling/pie.rb', line 531

def border_color
  @border_color
end

#colorObject

#FFFFFF

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



516
517
518
# File 'lib/ambling/pie.rb', line 516

def color
  @color
end

#enabledObject

true

(true / false)



496
497
498
# File 'lib/ambling/pie.rb', line 496

def enabled
  @enabled
end

#keyObject

KEY (the color box near every legend entry)



571
572
573
# File 'lib/ambling/pie.rb', line 571

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)



556
557
558
# File 'lib/ambling/pie.rb', line 556

def margins
  @margins
end

#max_columnsObject

(Number) the maximum number of columns in the legend



521
522
523
# File 'lib/ambling/pie.rb', line 521

def max_columns
  @max_columns
end

#reverse_orderObject

false

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



561
562
563
# File 'lib/ambling/pie.rb', line 561

def reverse_order
  @reverse_order
end

#spacingObject

10

(Number) vertical and horizontal gap between legend entries



551
552
553
# File 'lib/ambling/pie.rb', line 551

def spacing
  @spacing
end

#text_colorObject

text_color

(hex color code)



541
542
543
# File 'lib/ambling/pie.rb', line 541

def text_color
  @text_color
end

#text_sizeObject

text_size

(Number)



546
547
548
# File 'lib/ambling/pie.rb', line 546

def text_size
  @text_size
end

#valuesObject

VALUES



576
577
578
# File 'lib/ambling/pie.rb', line 576

def values
  @values
end

#widthObject

90%

(Number / Number%)



511
512
513
# File 'lib/ambling/pie.rb', line 511

def width
  @width
end

#xObject

5%

(Number / Number% / !Number)



501
502
503
# File 'lib/ambling/pie.rb', line 501

def x
  @x
end

#yObject

(Number / Number% / !Number) if empty, will be placed below the pie



506
507
508
# File 'lib/ambling/pie.rb', line 506

def y
  @y
end