Class: Ambling::Xy::Settings::Graphs::Graph

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

Overview

if you are using XML data file, graph “gid” must match graph “gid” in data file

Constant Summary collapse

VALUES =
[:title,:color,:alpha,:width,:data_labels,:balloon_text,:bullet_max_size,:bullet_min_size,:bullet,:bullet_size,:bullet_color,:bullet_alpha,:visible_in_legend]
ATTRIBUTES =
[:gid]

Instance Attribute Summary collapse

Method Summary

Methods included from Base

#build_xml, #initialize, #populate, #to_xml

Instance Attribute Details

#alphaObject

100

(0 - 100) line alpha. WIll not affect bullets. Set to 0 if you want the line to be invisible



1451
1452
1453
# File 'lib/ambling/xy.rb', line 1451

def alpha
  @alpha
end

#balloon_textObject

(#title value description x y percents) You can format any data label: #title will be replaced with real title, value - with value and so on. You can add your own text or html code too. You can also use #title, value and other tags in description.



1466
1467
1468
# File 'lib/ambling/xy.rb', line 1466

def balloon_text
  @balloon_text
end

#bulletObject

(square, round, square_outlined, round_outlined, bubble, square_outline, round_outline, x. triangle_up, triangle_down, romb filename.swf) can be used predefined bullets or loaded custom bullets. Leave empty if you don’t want to have bullets at all. Outlined bullets use plot area color for outline color



1481
1482
1483
# File 'lib/ambling/xy.rb', line 1481

def bullet
  @bullet
end

#bullet_alphaObject

100

(Number)



1496
1497
1498
# File 'lib/ambling/xy.rb', line 1496

def bullet_alpha
  @bullet_alpha
end

#bullet_colorObject

(hex color code) bullet color. If not defined, graph color is used



1491
1492
1493
# File 'lib/ambling/xy.rb', line 1491

def bullet_color
  @bullet_color
end

#bullet_max_sizeObject

50

maximum size of a bullet (balloon) The bullet with the highest value will be equal to this size



1471
1472
1473
# File 'lib/ambling/xy.rb', line 1471

def bullet_max_size
  @bullet_max_size
end

#bullet_min_sizeObject

0

minimum size of a bullet (balloon)



1476
1477
1478
# File 'lib/ambling/xy.rb', line 1476

def bullet_min_size
  @bullet_min_size
end

#bullet_sizeObject

(Number) bullet size. This param is only used if your values are not set in data file



1486
1487
1488
# File 'lib/ambling/xy.rb', line 1486

def bullet_size
  @bullet_size
end

#colorObject

(hex color code)



1446
1447
1448
# File 'lib/ambling/xy.rb', line 1446

def color
  @color
end

#data_labelsObject

(#title value description x y percents) You can format any data label: #title will be replaced with real title, value - with value and so on. You can add your own text or html code too.



1461
1462
1463
# File 'lib/ambling/xy.rb', line 1461

def data_labels
  @data_labels
end

#gidObject

xml attribute



1506
1507
1508
# File 'lib/ambling/xy.rb', line 1506

def gid
  @gid
end

#titleObject

(graph title)



1441
1442
1443
# File 'lib/ambling/xy.rb', line 1441

def title
  @title
end

#visible_in_legendObject

true

(true / false) whether to show legend entry for this graph or not



1501
1502
1503
# File 'lib/ambling/xy.rb', line 1501

def visible_in_legend
  @visible_in_legend
end

#widthObject

0

(Number) line width



1456
1457
1458
# File 'lib/ambling/xy.rb', line 1456

def width
  @width
end