Repository: zeppelin
Updated Branches:
  refs/heads/master 045b2d24d -> 61f4ce894


[ZEPPELIN-1273] Use Math.abs to determine if custom formatter should be called 
for y axis values

### What is this PR for?
Use Math.abs to determine if custom formatter should be called for y axis 
values.

### What type of PR is it?
Bug Fix

### Todos
* [ ] - Task

### What is the Jira issue?
[ZEPPELIN-1273] https://issues.apache.org/jira/browse/ZEPPELIN-1273

### How should this be tested?
Create simple table with two columns - date in one and large negative numbers 
like -10000000 in other. Display line chart and see that the y axis values are 
formatted like -10M.

### 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: Prasad Wagle <[email protected]>

Closes #1270 from prasadwagle/ZEPPELIN-1273 and squashes the following commits:

2c62f56 [Prasad Wagle] Merge branch 'master' into ZEPPELIN-1273
06e12f8 [Prasad Wagle] Use Math.abs to determine if custom formatter should be 
called for y axis values


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/61f4ce89
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/61f4ce89
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/61f4ce89

Branch: refs/heads/master
Commit: 61f4ce8942458560bc91549f6984e8b009fe3ef8
Parents: 045b2d2
Author: Prasad Wagle <[email protected]>
Authored: Wed Aug 3 09:53:40 2016 -0700
Committer: Lee moon soo <[email protected]>
Committed: Sun Aug 7 20:38:08 2016 -0700

----------------------------------------------------------------------
 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/61f4ce89/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 9322351..f1d04cd 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -1010,7 +1010,7 @@ 
angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $r
   };
 
   var yAxisTickFormat = function(d) {
-    if (d >= Math.pow(10,6)) {
+    if (Math.abs(d) >= Math.pow(10,6)) {
       return customAbbrevFormatter(d);
     }
     return groupedThousandsWith3DigitsFormatter(d);

Reply via email to