Class: Ambling::Xy::Settings::Values::X

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

Overview

x axis

Constant Summary collapse

VALUES =
[:enabled,:type,:reverse,:min,:max,:strict_min_max,:frequency,:rotate,:skip_first,:skip_last,:color,:text_size,:unit,:unit_position,:integers_only,:inside]

Instance Attribute Summary collapse

Method Summary

Methods included from Base

#build_xml, #initialize, #populate, #to_xml

Instance Attribute Details

#colorObject

text_color

(hex color code)



473
474
475
# File 'lib/ambling/xy.rb', line 473

def color
  @color
end

#enabledObject

true

(true / false)



423
424
425
# File 'lib/ambling/xy.rb', line 423

def enabled
  @enabled
end

#frequencyObject

1

(Number) how often values should be placed, 1 - near every gridline, 2 - near every second gridline…



453
454
455
# File 'lib/ambling/xy.rb', line 453

def frequency
  @frequency
end

#insideObject

false

(true / false) if set to true, axis values will be displayed inside plot area. This setting will not work for values rotated by 1-89 degrees (0 and 90 only)



498
499
500
# File 'lib/ambling/xy.rb', line 498

def inside
  @inside
end

#integers_onlyObject

false

(true / false) if set to true, values with decimals will be omitted



493
494
495
# File 'lib/ambling/xy.rb', line 493

def integers_only
  @integers_only
end

#maxObject

(Number) maximum value of this axis. If empty, this value will be calculated automatically



443
444
445
# File 'lib/ambling/xy.rb', line 443

def max
  @max
end

#minObject

(Number) minimum value of this axis. If empty, this value will be calculated automatically.



438
439
440
# File 'lib/ambling/xy.rb', line 438

def min
  @min
end

#reverseObject

false

(true / false) whether to reverse this axis values or not. If set to true, values will start from biggest number and will end with a smallest number



433
434
435
# File 'lib/ambling/xy.rb', line 433

def reverse
  @reverse
end

#rotateObject

0

(0 - 90) angle of rotation. If you want to rotate by degree from 1 to 89, you must have font.swf file in fonts folder



458
459
460
# File 'lib/ambling/xy.rb', line 458

def rotate
  @rotate
end

#skip_firstObject

true

(true / false) to skip or not first value



463
464
465
# File 'lib/ambling/xy.rb', line 463

def skip_first
  @skip_first
end

#skip_lastObject

false

(true / false) to skip or not last value



468
469
470
# File 'lib/ambling/xy.rb', line 468

def skip_last
  @skip_last
end

#strict_min_maxObject

false

(true / false) by default, if your values are bigger then defined max (or smaller then defined min), max and min is changed so that all the chart would fit to chart area. If you don’t want this, set this option to true.



448
449
450
# File 'lib/ambling/xy.rb', line 448

def strict_min_max
  @strict_min_max
end

#text_sizeObject

text_size

(Number)



478
479
480
# File 'lib/ambling/xy.rb', line 478

def text_size
  @text_size
end

#typeObject

“date” means that your axis will display dates (you must specify date formats in <date_formats>)



428
429
430
# File 'lib/ambling/xy.rb', line 428

def type
  @type
end

#unitObject

(text)



483
484
485
# File 'lib/ambling/xy.rb', line 483

def unit
  @unit
end

#unit_positionObject

right

(right / left)



488
489
490
# File 'lib/ambling/xy.rb', line 488

def unit_position
  @unit_position
end