module ChartBibz::Helpers::ChartHelper
Helper for chart bibz
Public Instance Methods
chart(data = {}, options = {}, html_options = {})
click to toggle source
Generate the html of the canvas
@example Generate the canvas
chart {datasets: {data: [1,2,3]}}, {type: :bar}, {class: "My-chart"}
@see ChartBibz::ViewComponents::ChartViewComponent#initialize
@param [Hash] data @param [Hash] options @param [Hash] html_options @return [String] HTML
@api public
# File lib/chart_bibz/helpers/chart_helper.rb, line 22 def chart(data = {}, options = {}, html_options = {}) ChartBibz::ViewComponents::ChartViewComponent.new(data, options, html_options).render end