Class: RCharts::GraphHelper::Categories::BarBuilder

Inherits:
ElementBuilder show all
Defined in:
app/helpers/rcharts/graph_helper/categories/bar_builder.rb

Overview

Bar Builder

Instance Method Summary collapse

Methods inherited from ElementBuilder

#render_in

Instance Method Details

#bar ⇒ Object

Renders a bar segment. Passes through :data, and :aria, and :class options to the tag builder. <%= graph_for @annual_sales do |graph| %> <%= graph.category do |category| %> <%= category.series do |series| %> <%= series.bar %> <% end %> <% end %> <% end %>



25
26
27
28
# File 'app/helpers/rcharts/graph_helper/categories/bar_builder.rb', line 25

def bar(**)
  render BarSegmentElement.new(inline_size:, block_size:, block_position:, inline_index:, series_index:,
                               horizontal:, series_options:, **)
end