Repository: zeppelin Updated Branches: refs/heads/master cf1f872e4 -> f236f1ccd
[ZEPPELIN-675] "No data available" in invalid graph types for sql queries ### What is this PR for? Overriding graph message 'No data available' to 'Invalid Data, check graph settings' ### What type of PR is it? Improvement ### Todos * For Table and Map in graphs 'No data available' message is not shown, Maybe we want to implement this. ### What is the Jira issue? [ZEPPELIN-675] "No data available" in invalid graph types for sql queries ### How should this be tested? Step 1: Run a sql query which will return 1 column or no records. Step 2: Choose pie chart / bar chart Verification: Earlier the message is "No data available", It should have been changed to 'Invalid Data, check graph settings' ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? NO * Is there breaking changes for older versions? NO * Does this needs documentation? NO Author: Naveen Subramanian <naveen.subraman...@imaginea.com> Closes #1510 from snaveenp/ZEPPELIN-675-NoDataAvailable-in-graph and squashes the following commits: 75494a1 [Naveen Subramanian] Added custom message for no data in graph Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/f236f1cc Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/f236f1cc Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/f236f1cc Branch: refs/heads/master Commit: f236f1ccd3fef31370a350d72d4c757c6749f446 Parents: cf1f872 Author: Naveen Subramanian <naveen.subraman...@imaginea.com> Authored: Thu Oct 13 12:42:27 2016 +0530 Committer: Damien CORNEAU <cornead...@gmail.com> Committed: Sun Oct 30 10:15:13 2016 +0900 ---------------------------------------------------------------------- zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/f236f1cc/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js index 8fa1876..141b059 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js @@ -1107,6 +1107,7 @@ var setD3Chart = function(type, data, refresh) { if (!$scope.chart[type]) { var chart = nv.models[type](); + chart._options.noData = 'Invalid Data, check graph settings'; $scope.chart[type] = chart; } @@ -1123,7 +1124,6 @@ $scope.chart[type].xAxis.tickFormat(function(d) {return xAxisTickFormat(d, xLabels);}); $scope.chart[type].yAxis.tickFormat(function(d) {return yAxisTickFormat(d, yLabels);}); - // configure how the tooltip looks. $scope.chart[type].tooltipContent(function(key, x, y, graph, data) { var tooltipContent = '<h3>' + key + '</h3>';