Repository: zeppelin Updated Branches: refs/heads/master e7882b6db -> 6ae578cad
[ZEPPELIN-2348] Line chart setting is not rendered (master) ### What is this PR for? Line chart setting is not rendered. ### What type of PR is it? [Bug Fix] ### Todos None. ### What is the Jira issue? [ZEPPELIN-2348](https://issues.apache.org/jira/browse/ZEPPELIN-2348) ### How should this be tested? 1. Open the default line chart's setting 2. Check checkboxes for options. ### Screenshots (if appropriate) #### After  ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - NO Author: 1ambda <1am...@gmail.com> Closes #2218 from 1ambda/ZEPPELIN-2348/line-chart-setting-msater and squashes the following commits: 0f3ea04 [1ambda] fix: Tr, Vis setting Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/6ae578ca Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/6ae578ca Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/6ae578ca Branch: refs/heads/master Commit: 6ae578cadf92b20f629a5888f7381da3eaa881c5 Parents: e7882b6 Author: 1ambda <1am...@gmail.com> Authored: Tue Apr 4 14:00:18 2017 +0900 Committer: Lee moon soo <m...@apache.org> Committed: Wed Apr 5 04:37:55 2017 +0900 ---------------------------------------------------------------------- .../notebook/paragraph/result/result.controller.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6ae578ca/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js b/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js index 6b26595..5708339 100644 --- a/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js @@ -468,6 +468,14 @@ function ResultCtrl($scope, $rootScope, $route, $window, $routeParams, $location } } + const getTrSettingElem = function(scopeId, graphMode) { + return angular.element('#trsetting' + scopeId + '_' + graphMode) + } + + const getVizSettingElem = function(scopeId, graphMode) { + return angular.element('#vizsetting' + scopeId + '_' + graphMode) + } + const renderGraph = function(graphElemId, graphMode, refresh) { // set graph height const height = $scope.config.graph.height; @@ -495,8 +503,8 @@ function ResultCtrl($scope, $rootScope, $route, $window, $routeParams, $location // render when targetEl is available afterLoaded = function(loadedElem) { try { - const transformationSettingTargetEl = angular.element('#trsetting' + $scope.id + '_' + graphMode); - const visualizationSettingTargetEl = angular.element('#trsetting' + $scope.id + '_' + graphMode); + const transformationSettingTargetEl = getTrSettingElem($scope.id, graphMode) + const visualizationSettingTargetEl = getVizSettingElem($scope.id, graphMode) // set height loadedElem.height(height); @@ -537,8 +545,8 @@ function ResultCtrl($scope, $rootScope, $route, $window, $routeParams, $location console.log('Refresh data %o', tableData); afterLoaded = function(loadedElem) { - const transformationSettingTargetEl = angular.element('#trsetting' + $scope.id + '_' + graphMode); - const visualizationSettingTargetEl = angular.element('#trsetting' + $scope.id + '_' + graphMode); + const transformationSettingTargetEl = getTrSettingElem($scope.id, graphMode) + const visualizationSettingTargetEl = getVizSettingElem($scope.id, graphMode) const config = getVizConfig(graphMode); loadedElem.height(height); const transformation = builtInViz.instance.getTransformation();