Class: Ambling::Stock::Settings::Charts::Chart

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

Overview

(Number) the relative height of your chart. If you have one chart, it will take 100% of

plot area. If you do not set any number, the space for your charts will be divided equally #

Defined Under Namespace

Classes: Comparing, Events, Graphs, Grid, Legend, Values

Constant Summary collapse

VALUES =
[:height,:title,:bg_color,:bg_alpha,:border_color,:border_alpha,:grid,:values,:legend,:comparing,:events,:column_width,:graphs]
ATTRIBUTES =
[:cid]

Instance Attribute Summary collapse

Method Summary

Methods included from Base

#build_xml, #initialize, #populate, #to_xml

Instance Attribute Details

#bg_alphaObject

#CCCCCC

(hex code) Chart border color #



403
404
405
# File 'lib/ambling/stock.rb', line 403

def bg_alpha
  @bg_alpha
end

#bg_colorObject

100

(0 - 100) background opacity #



399
400
401
# File 'lib/ambling/stock.rb', line 399

def bg_color
  @bg_color
end

#border_alphaObject

GRID #



411
412
413
# File 'lib/ambling/stock.rb', line 411

def border_alpha
  @border_alpha
end

#border_colorObject

100

(0 - 100) border opacity #



407
408
409
# File 'lib/ambling/stock.rb', line 407

def border_color
  @border_color
end

#cidObject

xml attribute



447
448
449
# File 'lib/ambling/stock.rb', line 447

def cid
  @cid
end

#column_widthObject

GRAPHS. One chart can have a lot of graphs #



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

def column_width
  @column_width
end

#comparingObject

true

(true / false) in stock charts, when comparing one stock with another it is used

to recalculate chart values to percents, as the difference between values of different
stocks can be very big. However, if you compare close values, for example unique visitors 
with new visitors, it would be better not to recalculate values #


430
431
432
# File 'lib/ambling/stock.rb', line 430

def comparing
  @comparing
end

#eventsObject

true

(true / false) Whether to show balloon with description on roll-over the flag or not. #



434
435
436
# File 'lib/ambling/stock.rb', line 434

def events
  @events
end

#graphsObject

first graph #



442
443
444
# File 'lib/ambling/stock.rb', line 442

def graphs
  @graphs
end

#gridObject

Returns the value of attribute grid.



415
416
417
# File 'lib/ambling/stock.rb', line 415

def grid
  @grid
end

#heightObject

(text) chart’s title is displayed above your chart, in the left #



390
391
392
# File 'lib/ambling/stock.rb', line 390

def height
  @height
end

#legendObject

true

(true / false) whether to show legend or not #



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

def legend
  @legend
end

#titleObject

#FFFFFF

(hex code) Chart background color. Separate color codes with commas if you want

to have gradient background#


395
396
397
# File 'lib/ambling/stock.rb', line 395

def title
  @title
end

#valuesObject

Returns the value of attribute values.



419
420
421
# File 'lib/ambling/stock.rb', line 419

def values
  @values
end