Class: RCharts::GraphHelper::LegendEntryBuilder
- Inherits:
-
ElementBuilder
- Object
- ElementBuilder
- RCharts::GraphHelper::LegendEntryBuilder
- Defined in:
- app/helpers/rcharts/graph_helper/legend_entry_builder.rb
Overview
Legend Entry Builder
Instance Method Summary collapse
-
#index ⇒ Object
:attr_accessor: index.
-
#name ⇒ Object
:attr_accessor:.
-
#symbol ⇒ Object
Renders the symbol associated with the series.
Methods inherited from ElementBuilder
Instance Method Details
#index ⇒ Object
:attr_accessor: index
13 |
# File 'app/helpers/rcharts/graph_helper/legend_entry_builder.rb', line 13 attribute :index, :integer, default: 0 |
#name ⇒ Object
:attr_accessor:
9 |
# File 'app/helpers/rcharts/graph_helper/legend_entry_builder.rb', line 9 attribute :name |
#symbol ⇒ Object
Renders the symbol associated with the series. You can override this on a per-series basis using :series_options with GraphHelper#graph_for. To change the global set of symbols and colors, see RCharts.symbol_for and RCharts.color_class_for.
<%= graph_for @annual_sales do |graph| %>
<%= graph.tooltips do |category| %>
<h4><%= category.name %></h4>
<%= category.series do |series| %>
<%= series.symbol %>
<%= series.name %>
<% end %>
<% end %>
<% end %>
29 30 31 |
# File 'app/helpers/rcharts/graph_helper/legend_entry_builder.rb', line 29 def symbol tag.span symbol_character, class: ['series-symbol', color_class] end |