Class: RailsDataExplorer::Chart

Inherits:
Object
  • Object
show all
Includes:
ActionView::Helpers::NumberHelper, ActionView::Helpers::TagHelper
Defined in:
lib/rails_data_explorer/chart.rb,
lib/rails_data_explorer/chart/box_plot.rb,
lib/rails_data_explorer/chart/pie_chart.rb,
lib/rails_data_explorer/chart/scatterplot.rb,
lib/rails_data_explorer/chart/parallel_set.rb,
lib/rails_data_explorer/chart/box_plot_group.rb,
lib/rails_data_explorer/chart/contingency_table.rb,
lib/rails_data_explorer/chart/histogram_temporal.rb,
lib/rails_data_explorer/chart/parallel_coordinates.rb,
lib/rails_data_explorer/chart/histogram_categorical.rb,
lib/rails_data_explorer/chart/histogram_quantitative.rb,
lib/rails_data_explorer/chart/stacked_histogram_temporal.rb,
lib/rails_data_explorer/chart/descriptive_statistics_table.rb,
lib/rails_data_explorer/chart/stacked_bar_chart_categorical.rb,
lib/rails_data_explorer/chart/stacked_bar_chart_categorical_percent.rb

Overview

Responsibilities:

* Visualize data
* Integrate with front end visualization libraries

Collaborators:

* RdeTable

Defined Under Namespace

Classes: BoxPlot, BoxPlotGroup, ContingencyTable, DescriptiveStatisticsTable, HistogramCategorical, HistogramQuantitative, HistogramTemporal, ParallelCoordinates, ParallelSet, PieChart, Scatterplot, StackedBarChartCategorical, StackedBarChartCategoricalPercent, StackedHistogramTemporal

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#output_bufferObject

required for content_tag



15
16
17
# File 'lib/rails_data_explorer/chart.rb', line 15

def output_buffer
  @output_buffer
end

Instance Method Details

#dom_idObject



18
19
20
# File 'lib/rails_data_explorer/chart.rb', line 18

def dom_id
  "rde-chart-#{ object_id }"
end

#render?Boolean

Returns true if this chart will be rendered. Sometimes we can’t make that decision until render time. Override this method in sub classes, e.g., to avoid rendering ParallelCoordinates when all data series are categorical.

Returns:

  • (Boolean)


25
26
27
# File 'lib/rails_data_explorer/chart.rb', line 25

def render?
  true
end