class BarChart::HorizontalBar
Public Instance Methods
height()
click to toggle source
# File lib/charts/bar_chart/bar/horizontal_bar.rb, line 30 def height chart.bar_inner_width.floor.to_i end
width()
click to toggle source
# File lib/charts/bar_chart/bar/horizontal_bar.rb, line 26 def width chart.inner_width * (data_value - chart.base_line).abs end
x()
click to toggle source
# File lib/charts/bar_chart/bar/horizontal_bar.rb, line 2 def x x_margin + x_offset end
x_margin()
click to toggle source
# File lib/charts/bar_chart/bar/horizontal_bar.rb, line 6 def x_margin chart.outer_margin end
x_offset()
click to toggle source
# File lib/charts/bar_chart/bar/horizontal_bar.rb, line 10 def x_offset chart.inner_width * [data_value, chart.base_line].min end
y()
click to toggle source
# File lib/charts/bar_chart/bar/horizontal_bar.rb, line 14 def y (y_margin + y_offset).floor.to_i end
y_margin()
click to toggle source
# File lib/charts/bar_chart/bar/horizontal_bar.rb, line 18 def y_margin chart.outer_margin + chart.bar_margin + chart.group_margin * bar_nr_in_set end
y_offset()
click to toggle source
# File lib/charts/bar_chart/bar/horizontal_bar.rb, line 22 def y_offset chart.bar_outer_width * bar_number_in_chart end