Class: RailsDataExplorer::Chart::DescriptiveStatisticsTable
- Inherits:
-
RailsDataExplorer::Chart
- Object
- RailsDataExplorer::Chart
- RailsDataExplorer::Chart::DescriptiveStatisticsTable
- Defined in:
- lib/rails-data-explorer/chart/descriptive_statistics_table.rb
Instance Attribute Summary
Attributes inherited from RailsDataExplorer::Chart
Instance Method Summary collapse
-
#initialize(_data_set, options = {}) ⇒ DescriptiveStatisticsTable
constructor
A new instance of DescriptiveStatisticsTable.
- #render ⇒ Object
Methods inherited from RailsDataExplorer::Chart
Constructor Details
#initialize(_data_set, options = {}) ⇒ DescriptiveStatisticsTable
Returns a new instance of DescriptiveStatisticsTable.
5 6 7 8 |
# File 'lib/rails-data-explorer/chart/descriptive_statistics_table.rb', line 5 def initialize(_data_set, = {}) @data_set = _data_set @options = {}.merge() end |
Instance Method Details
#render ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/rails-data-explorer/chart/descriptive_statistics_table.rb', line 10 def render return '' unless render? content_tag(:div, id: dom_id, class: 'rde-chart rde-descriptive-statistics-table') do @data_set.data_series.map { |data_series| content_tag(:h3, "Descriptive Statistics", class: 'rde-chart-title') + render_html_table(data_series.descriptive_statistics_table) }.join.html_safe end end |