Method: ActiveCharts::BarChart#bars_specs
- Defined in:
- lib/active_charts/bar_chart.rb
#bars_specs ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/active_charts/bar_chart.rb', line 26 def collection.map.with_index do |row, row_index| row.map.with_index do |cell, col_index| height = (cell, col_index) x = (col_index, row_index) y = grid_height - height { height: height, x: x, y: y, class: (col_index), val: cell, formatter: data_formatters[col_index] } end end end |