Class: Ambling::Pie::Settings::Legend
- Inherits:
-
Object
- Object
- Ambling::Pie::Settings::Legend
- Includes:
- Base
- Defined in:
- lib/ambling/pie.rb
Overview
LEGEND
Defined Under Namespace
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
-
#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).
-
#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_size ⇒ Object
- text_size
-
(Number).
-
#values ⇒ Object
VALUES.
-
#width ⇒ Object
- 90%
-
(Number / Number%).
-
#x ⇒ Object
- 5%
-
(Number / Number% / !Number).
-
#y ⇒ Object
-
(Number / Number% / !Number) if empty, will be placed below the pie.
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
566 567 568 |
# File 'lib/ambling/pie.rb', line 566 def align @align end |
#alpha ⇒ Object
- 0
-
(0 - 100) background alpha
526 527 528 |
# File 'lib/ambling/pie.rb', line 526 def alpha @alpha end |
#border_alpha ⇒ Object
- 0
-
(0 - 100) border alpha
536 537 538 |
# File 'lib/ambling/pie.rb', line 536 def border_alpha @border_alpha end |
#border_color ⇒ Object
- #000000
-
(hex color code) border color
531 532 533 |
# File 'lib/ambling/pie.rb', line 531 def border_color @border_color end |
#color ⇒ Object
- #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 |
#enabled ⇒ Object
- true
-
(true / false)
496 497 498 |
# File 'lib/ambling/pie.rb', line 496 def enabled @enabled end |
#key ⇒ Object
KEY (the color box near every legend entry)
571 572 573 |
# File 'lib/ambling/pie.rb', line 571 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)
556 557 558 |
# File 'lib/ambling/pie.rb', line 556 def margins @margins end |
#max_columns ⇒ Object
-
(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_order ⇒ Object
- 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 |
#spacing ⇒ Object
- 10
-
(Number) vertical and horizontal gap between legend entries
551 552 553 |
# File 'lib/ambling/pie.rb', line 551 def spacing @spacing end |
#text_color ⇒ Object
- text_color
-
(hex color code)
541 542 543 |
# File 'lib/ambling/pie.rb', line 541 def text_color @text_color end |
#text_size ⇒ Object
- text_size
-
(Number)
546 547 548 |
# File 'lib/ambling/pie.rb', line 546 def text_size @text_size end |
#values ⇒ Object
VALUES
576 577 578 |
# File 'lib/ambling/pie.rb', line 576 def values @values end |
#width ⇒ Object
- 90%
-
(Number / Number%)
511 512 513 |
# File 'lib/ambling/pie.rb', line 511 def width @width end |
#x ⇒ Object
- 5%
-
(Number / Number% / !Number)
501 502 503 |
# File 'lib/ambling/pie.rb', line 501 def x @x end |
#y ⇒ Object
-
(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 |