Class: TChart::LayoutBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/tchart/process/layout_builder.rb

Overview

Responsible for calculating chart metrics and storing them in an instance of Layout. Metrics depend on chart settings and the number and dates ranges of the items being plotted.

Class Method Summary collapse

Class Method Details

.build(settings, items) ⇒ Object

> [ layout, errors ]



10
11
12
13
14
# File 'lib/tchart/process/layout_builder.rb', line 10

def self.build(settings, items) # => [ layout, errors ]
  layout = build_layout(settings, items)
  errors = check_layout(layout)
  [ layout, errors ]
end