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/descriptive_statistics_table.rb,
lib/rails-data-explorer/chart/stacked_bar_chart_categorical_percent.rb

Defined Under Namespace

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#output_bufferObject

required for content_tag



5
6
7
# File 'lib/rails-data-explorer/chart.rb', line 5

def output_buffer
  @output_buffer
end

Instance Method Details

#dom_idObject



8
9
10
# File 'lib/rails-data-explorer/chart.rb', line 8

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)


15
16
17
# File 'lib/rails-data-explorer/chart.rb', line 15

def render?
  true
end