Class: AlGraph::BarPlot
Overview
バーグラフプロットクラス
Constant Summary
Constants inherited from GraphView
Instance Attribute Summary collapse
-
#overlap ⇒ Numeric
readonly
棒のオーバーラップ率(%).
-
#spacing ⇒ Numeric
readonly
棒の間隔率(%:100%で軸とスペースが同じ幅).
Attributes inherited from GraphView
Instance Method Summary collapse
-
#add_data_series(data_obj, base_bar) ⇒ Object
(BarPlot) データコンテナ追加.
-
#initialize(width, height) ⇒ BarPlot
constructor
(BarPlot) constructor.
-
#set_overlap(v) ⇒ Object
(also: #overlap=)
(BarPlot) 棒どうしのオーバーラップ率指定.
-
#set_spacing(v) ⇒ Object
(also: #spacing=)
(BarPlot) 棒どうしの間隔指定.
Constructor Details
#initialize(width, height) ⇒ BarPlot
(BarPlot) constructor
1588 1589 1590 1591 1592 |
# File 'lib/al_graph.rb', line 1588 def initialize( width, height ) super @overlap = 0 @spacing = 100 end |
Instance Attribute Details
#overlap ⇒ Numeric (readonly)
Returns 棒のオーバーラップ率(%).
1578 1579 1580 |
# File 'lib/al_graph.rb', line 1578 def overlap @overlap end |
#spacing ⇒ Numeric (readonly)
Returns 棒の間隔率(%:100%で軸とスペースが同じ幅).
1581 1582 1583 |
# File 'lib/al_graph.rb', line 1581 def spacing @spacing end |
Instance Method Details
#add_data_series(data_obj, base_bar) ⇒ Object
(BarPlot) データコンテナ追加
1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 |
# File 'lib/al_graph.rb', line 1601 def add_data_series(data_obj, ) if @data_series.each_with_index {|ds, i| if ds == @data_series.insert(i, data_obj) break end } else @data_series << data_obj end end |
#set_overlap(v) ⇒ Object Also known as: overlap=
(BarPlot) 棒どうしのオーバーラップ率指定
1622 1623 1624 |
# File 'lib/al_graph.rb', line 1622 def set_overlap(v) @overlap = v end |
#set_spacing(v) ⇒ Object Also known as: spacing=
(BarPlot) 棒どうしの間隔指定
1635 1636 1637 |
# File 'lib/al_graph.rb', line 1635 def set_spacing(v) @spacing = v end |