diff --git a/Dashboard/app/js/lib/views/reports/report-views.js b/Dashboard/app/js/lib/views/reports/report-views.js index 0ecf5841b9..bfb5dee974 100644 --- a/Dashboard/app/js/lib/views/reports/report-views.js +++ b/Dashboard/app/js/lib/views/reports/report-views.js @@ -22,8 +22,11 @@ FLOW.chartView = FLOW.View.extend({ this.chartType = FLOW.chartTypeControl.content[0]; }, + hideChart: function () { + return this.get('noChoiceBool') || this.get('noDataBool'); + }.property('noChoiceBool', 'noDataBool'), + getChartData: function () { - // createBarChart(); this.set('noChoiceBool', false); if (FLOW.selectedControl.get('selectedQuestion') !== null) { FLOW.surveyQuestionSummaryControl.doSurveyQuestionSummaryQuery(FLOW.selectedControl.selectedQuestion.get('keyId')); @@ -41,10 +44,11 @@ FLOW.chartView = FLOW.View.extend({ maxPer, i, tot, totPerc; deleteChart(); + if (FLOW.surveyQuestionSummaryControl.content.get('isLoaded') === true) { FLOW.chartDataControl.set('total', FLOW.surveyQuestionSummaryControl.content.get('length')); if (FLOW.chartDataControl.get('total') == 0) { - this.set('noDataBool',true); + this.set('noDataBool', true); return; } else { this.set('noDataBool', false); diff --git a/Dashboard/app/js/templates/navReports/chart-reports.handlebars b/Dashboard/app/js/templates/navReports/chart-reports.handlebars index c6a97df2a2..6b1e6ddc09 100644 --- a/Dashboard/app/js/templates/navReports/chart-reports.handlebars +++ b/Dashboard/app/js/templates/navReports/chart-reports.handlebars @@ -46,9 +46,11 @@
There is no data available for this question. Please select another one.
{{/if}}Choose a Question from above selectors.