Class: Ambling::Column::Settings::Graphs::Graph

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

Overview

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

Constant Summary collapse

VALUES =
[:type,:title,:color,:alpha,:data_labels,:gradient_fill_colors,:balloon_color,:balloon_alpha,:balloon_text_color,:balloon_text,:fill_alpha,:width,:bullet,:bullet_size,:bullet_color,: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

column.alpha (line.alpha)

(0 - 100)



1156
1157
1158
# File 'lib/ambling/column.rb', line 1156

def alpha
  @alpha
end

#balloon_alphaObject

balloon.alpha

(0 - 100)



1176
1177
1178
# File 'lib/ambling/column.rb', line 1176

def balloon_alpha
  @balloon_alpha
end

#balloon_colorObject

balloon.color

(hex color code) leave empty to use the same color as graph



1171
1172
1173
# File 'lib/ambling/column.rb', line 1171

def balloon_color
  @balloon_color
end

#balloon_textObject

column(line).balloon.text

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



1186
1187
1188
# File 'lib/ambling/column.rb', line 1186

def balloon_text
  @balloon_text
end

#balloon_text_colorObject

balloon.text_color

(hex color code)



1181
1182
1183
# File 'lib/ambling/column.rb', line 1181

def balloon_text_color
  @balloon_text_color
end

#bulletObject

line.bullet

(round, square, round_outlined, square_outline, round_outline, square_outlined, filename)



1201
1202
1203
# File 'lib/ambling/column.rb', line 1201

def bullet
  @bullet
end

#bullet_colorObject

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



1211
1212
1213
# File 'lib/ambling/column.rb', line 1211

def bullet_color
  @bullet_color
end

#bullet_sizeObject

line.bullet_size

(Number) bullet size



1206
1207
1208
# File 'lib/ambling/column.rb', line 1206

def bullet_size
  @bullet_size
end

#colorObject

(hex color code)



1151
1152
1153
# File 'lib/ambling/column.rb', line 1151

def color
  @color
end

#data_labelsObject

column.data_labels (line.data_labels)

(#title value series percents start difference total) 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.



1161
1162
1163
# File 'lib/ambling/column.rb', line 1161

def data_labels
  @data_labels
end

#fill_alphaObject

0

(0 - 100) fill alpha (use it if you want to have area chart)



1191
1192
1193
# File 'lib/ambling/column.rb', line 1191

def fill_alpha
  @fill_alpha
end

#gidObject

xml attribute



1221
1222
1223
# File 'lib/ambling/column.rb', line 1221

def gid
  @gid
end

#gradient_fill_colorsObject

(hex color codes separated by comas) columns can be filled with gradients. Set any number of colors here. Note, that the legend key will be filled with color value, not with gradient.



1166
1167
1168
# File 'lib/ambling/column.rb', line 1166

def gradient_fill_colors
  @gradient_fill_colors
end

#titleObject

(graph title)



1146
1147
1148
# File 'lib/ambling/column.rb', line 1146

def title
  @title
end

#typeObject

column

(column/line)



1141
1142
1143
# File 'lib/ambling/column.rb', line 1141

def type
  @type
end

#visible_in_legendObject

true

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



1216
1217
1218
# File 'lib/ambling/column.rb', line 1216

def visible_in_legend
  @visible_in_legend
end

#widthObject

2

(Number) line width



1196
1197
1198
# File 'lib/ambling/column.rb', line 1196

def width
  @width
end