lib/annlat/plot.rb
def chart_template
    case @params[:type]
    when :piechart
      'highchart_piechart'
    when :numberline
      'highchart_numberline'
    end
  end
# params is a hash
# * type: specifies chart type
#   valid types are:
#   * piechart
#   * numberline
# * title: specifies chart title
params is a hash
type: specifies chart type
valid types are:
piechart
numberline
title: specifies chart title
params is a hash type : specifies chart type valid types are : piechart numberline title : specifies chart title
def chart_template
    case @params[:type]
    when :piechart
      'highchart_piechart'
    when :numberline
      'highchart_numberline'
    end
  end
def chart_template case @params [ :type ] when :piechart 'highchart_piechart' when :numberline 'highchart_numberline' end end
params is a hash
 type: specifies chart type
valid types are:
 piechart
 numberline
 title: specifies chart title
params is a hash type : specifies chart type valid types are : piechart numberline title : specifies chart title