options[:to]=Date::strptime(params[:to])
end
- stream = TrendsChart.png_chart(width, height, resource, metric_ids, params[:locale] || I18n.locale, display_legend, options)
+ stream = TrendsChart.png_chart(width, height, resource, metric_ids, params[:locale] || I18n.locale.to_s, display_legend, options)
send_data stream, :type => 'image/png', :disposition => 'inline'
end
end
class TrendsChart
def self.png_chart(width, height, resource, metrics, locale, display_legend, options={})
- java_chart = Java::OrgSonarServerChartsJruby::TrendsChart.new(width, height, locale.gsub(/\-/, '_'), display_legend)
+ java_chart = Java::OrgSonarServerChartsJruby::TrendsChart.new(width, height, locale.to_s.gsub(/\-/, '_'), display_legend)
init_series(java_chart, metrics)
metric_ids=metrics.map{|m| m.id}