From 822c11f4c0e8c8a9dd5d0472fa2ffffb98c64eb0 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Sat, 18 Aug 2012 18:56:09 +0200 Subject: [PATCH] graph --- app/views/survey_sets/show.html.haml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/views/survey_sets/show.html.haml b/app/views/survey_sets/show.html.haml index 8a2b656..ef2c4f7 100644 --- a/app/views/survey_sets/show.html.haml +++ b/app/views/survey_sets/show.html.haml @@ -142,12 +142,8 @@ %script $(document).ready(function() { - -if item.answers.count > 4 - =raw 'chartbar("'+r.to_s+'", '+chart_data.to_json+', '+categories.to_s+', "'+item.title+'");' - -else - charts.push(new Highcharts.Chart( - =raw 'getChartConfig("'+r.to_s+'", "'+item.title+'", '+chart_data.to_json+')' - )); + + =raw 'chartbar("'+r.to_s+'", '+chart_data.to_json+', '+categories.to_s+', "'+item.title+'");' });