Class: Ambling::Line::Settings::Guides::Guide
- Inherits:
-
Object
- Object
- Ambling::Line::Settings::Guides::Guide
- Includes:
- Base
- Defined in:
- lib/ambling/line.rb
Overview
there can be any number of quides. guides can also be set in data xml file, using the same syntax as here
Constant Summary collapse
- VALUES =
[:axis,:start_value,:end_value,:title,:width,:color,:alpha,:fill_color,:fill_alpha,:inside,:centered,:rotate,:text_size,:text_color,:dashed,:dash_length]
Instance Attribute Summary collapse
-
#alpha ⇒ Object
- 100
-
(0 - 100) opacity of guide line.
-
#axis ⇒ Object
- left
-
(left / right) y axis of a guide.
-
#centered ⇒ Object
- true
-
(true / false) if you have start and end values defined, title can be placed in the middle between these values.
-
#color ⇒ Object
- #000000
-
(hex color code) color of guide line.
-
#dash_length ⇒ Object
- 5
-
(Number).
-
#dashed ⇒ Object
- false
-
(true / false).
-
#end_value ⇒ Object
(Number) if you set value here too, another quide will be drawn.
-
#fill_alpha ⇒ Object
- 0
-
(0 - 100) opacity of a fill.
-
#fill_color ⇒ Object
- guide.color
-
(hex color code) fill color.
-
#inside ⇒ Object
- values.y_#axis.inside
-
whether to place title inside plot area.
-
#rotate ⇒ Object
[values.y_#axis.rotate](0 - 90) angle of rotation of title.
-
#start_value ⇒ Object
(Number) value at which guide should be placed.
-
#text_color ⇒ Object
[values.y_#axis.color](hex color code).
-
#text_size ⇒ Object
- values.y_#axis.text_size
-
(Number).
-
#title ⇒ Object
-
(String) text which will be displayed near the guide.
-
#width ⇒ Object
- 0
-
(Number) width of a guide line (0 for hairline).
Method Summary
Methods included from Base
#build_xml, #initialize, #populate, #to_xml
Instance Attribute Details
#alpha ⇒ Object
- 100
-
(0 - 100) opacity of guide line
1772 1773 1774 |
# File 'lib/ambling/line.rb', line 1772 def alpha @alpha end |
#axis ⇒ Object
- left
-
(left / right) y axis of a guide. There should be at least one graph assigned to this axis in order guide to be visible
1742 1743 1744 |
# File 'lib/ambling/line.rb', line 1742 def axis @axis end |
#centered ⇒ Object
- true
-
(true / false) if you have start and end values defined, title can be placed in the middle between these values. If false, it will be placed near start_value
1792 1793 1794 |
# File 'lib/ambling/line.rb', line 1792 def centered @centered end |
#color ⇒ Object
- #000000
-
(hex color code) color of guide line
1767 1768 1769 |
# File 'lib/ambling/line.rb', line 1767 def color @color end |
#dash_length ⇒ Object
- 5
-
(Number)
1817 1818 1819 |
# File 'lib/ambling/line.rb', line 1817 def dash_length @dash_length end |
#dashed ⇒ Object
- false
-
(true / false)
1812 1813 1814 |
# File 'lib/ambling/line.rb', line 1812 def dashed @dashed end |
#end_value ⇒ Object
(Number) if you set value here too, another quide will be drawn. If you set fill alpha > 0, then the area between these quides will be filled with color
1752 1753 1754 |
# File 'lib/ambling/line.rb', line 1752 def end_value @end_value end |
#fill_alpha ⇒ Object
- 0
-
(0 - 100) opacity of a fill
1782 1783 1784 |
# File 'lib/ambling/line.rb', line 1782 def fill_alpha @fill_alpha end |
#fill_color ⇒ Object
- guide.color
-
(hex color code) fill color. If not defined, color of a guide will be used. Separate color codes with comas for gradient
1777 1778 1779 |
# File 'lib/ambling/line.rb', line 1777 def fill_color @fill_color end |
#inside ⇒ Object
- values.y_#axis.inside
-
whether to place title inside plot area
1787 1788 1789 |
# File 'lib/ambling/line.rb', line 1787 def inside @inside end |
#rotate ⇒ Object
[values.y_#axis.rotate](0 - 90) angle of rotation of title
1797 1798 1799 |
# File 'lib/ambling/line.rb', line 1797 def rotate @rotate end |
#start_value ⇒ Object
(Number) value at which guide should be placed
1747 1748 1749 |
# File 'lib/ambling/line.rb', line 1747 def start_value @start_value end |
#text_color ⇒ Object
[values.y_#axis.color](hex color code)
1807 1808 1809 |
# File 'lib/ambling/line.rb', line 1807 def text_color @text_color end |
#text_size ⇒ Object
- values.y_#axis.text_size
-
(Number)
1802 1803 1804 |
# File 'lib/ambling/line.rb', line 1802 def text_size @text_size end |
#title ⇒ Object
-
(String) text which will be displayed near the guide
1757 1758 1759 |
# File 'lib/ambling/line.rb', line 1757 def title @title end |
#width ⇒ Object
- 0
-
(Number) width of a guide line (0 for hairline)
1762 1763 1764 |
# File 'lib/ambling/line.rb', line 1762 def width @width end |