fix: space-in-parens

```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-scatterchart.js (7/0)
  ✖  212:10  There should be no spaces inside this paren  space-in-parens
  ✖  212:18  There should be no spaces inside this paren  space-in-parens
  ✖  215:10  There should be no spaces inside this paren  space-in-parens
  ✖  215:18  There should be no spaces inside this paren  space-in-parens
  ✖  232:47  There should be no spaces inside this paren  space-in-parens
  ✖  233:10  There should be no spaces inside this paren  space-in-parens
  ✖  234:74  There should be no spaces inside this paren  space-in-parens
```
This commit is contained in:
1ambda 2017-04-15 00:48:21 +09:00
parent b094fff553
commit 5948d97aa9
2 changed files with 5 additions and 6 deletions

View file

@ -38,7 +38,6 @@
"operator-linebreak": 0,
"prefer-spread": 0,
"space-before-blocks": 0,
"space-in-parens": 0,
"keyword-spacing": 0,
"no-redeclare": 0,
"standard/object-curly-even-spacing": 0,

View file

@ -209,10 +209,10 @@ export default class ScatterchartVisualization extends Nvd3ChartVisualization {
// TODO remove epsilon jitter after bump to nvd3 > 1.8.5
var xval = 0
var yval = 0;
if ( xAxis ){
if (xAxis){
xval = (isNaN(xValue) ? rowNameIndex[xValue] : parseFloat(xValue)) + Math.random() * epsilon;
}
if ( yAxis ){
if (yAxis){
yval = (isNaN(yValue) ? colNameIndex[yValue] : parseFloat(yValue)) + Math.random() * epsilon;
}
@ -229,9 +229,9 @@ export default class ScatterchartVisualization extends Nvd3ChartVisualization {
return ((a['x'] - b['x']) || (a['y'] - b['y']))
});
for (var i = 0; i < d3gvalues.length - 1; ){
if ( (Math.abs(d3gvalues[i]['x'] - d3gvalues[i+1]['x']) < epsilon) &&
(Math.abs(d3gvalues[i]['y'] - d3gvalues[i+1]['y']) < epsilon) ){
for (var i = 0; i < d3gvalues.length - 1;){
if ((Math.abs(d3gvalues[i]['x'] - d3gvalues[i+1]['x']) < epsilon) &&
(Math.abs(d3gvalues[i]['y'] - d3gvalues[i+1]['y']) < epsilon)){
d3gvalues.splice(i+1,1);
} else{
i++;