Class: Ambling::Line::Settings::Guides::Guide

Inherits:
Object
  • Object
show all
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

Method Summary

Methods included from Base

#build_xml, #initialize, #populate, #to_xml

Instance Attribute Details

#alphaObject

100

(0 - 100) opacity of guide line



1772
1773
1774
# File 'lib/ambling/line.rb', line 1772

def alpha
  @alpha
end

#axisObject

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

#centeredObject

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

#colorObject

#000000

(hex color code) color of guide line



1767
1768
1769
# File 'lib/ambling/line.rb', line 1767

def color
  @color
end

#dash_lengthObject

5

(Number)



1817
1818
1819
# File 'lib/ambling/line.rb', line 1817

def dash_length
  @dash_length
end

#dashedObject

false

(true / false)



1812
1813
1814
# File 'lib/ambling/line.rb', line 1812

def dashed
  @dashed
end

#end_valueObject

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

0

(0 - 100) opacity of a fill



1782
1783
1784
# File 'lib/ambling/line.rb', line 1782

def fill_alpha
  @fill_alpha
end

#fill_colorObject

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

#insideObject

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

#rotateObject

[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_valueObject

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

[values.y_#axis.color](hex color code)



1807
1808
1809
# File 'lib/ambling/line.rb', line 1807

def text_color
  @text_color
end

#text_sizeObject

values.y_#axis.text_size

(Number)



1802
1803
1804
# File 'lib/ambling/line.rb', line 1802

def text_size
  @text_size
end

#titleObject

(String) text which will be displayed near the guide



1757
1758
1759
# File 'lib/ambling/line.rb', line 1757

def title
  @title
end

#widthObject

0

(Number) width of a guide line (0 for hairline)



1762
1763
1764
# File 'lib/ambling/line.rb', line 1762

def width
  @width
end