module ActiveCharts::Helpers::LineChartHelper
Public Instance Methods
line_chart(collection, options = {})
click to toggle source
# File lib/active_charts/helpers/line_chart_helper.rb, line 8 def line_chart(collection, options = {}) LineChart.new(collection, options).to_html end
line_chart_for(resource_collection, columns = [], options = {})
click to toggle source
# File lib/active_charts/helpers/line_chart_helper.rb, line 12 def line_chart_for(resource_collection, columns = [], options = {}) return line_chart([[]], options) unless Util.valid_collection?(resource_collection) parser = CollectionParser.new(resource_collection, columns, options[:label_column]) series_labels = options[:series_labels] || parser.xy_series_labels options = options.merge(series_labels: series_labels, rows: parser.rows) line_chart(parser.xy_collection, options) end