From 1b542f14cb4d97fb1840633af35df61d46be7006 Mon Sep 17 00:00:00 2001 From: "Kanit \"Ham\" Wongsuphasawat" Date: Wed, 3 Dec 2014 11:10:17 -0800 Subject: [PATCH] --- src/vegalite.js | 9 +++++---- test-output.html | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/vegalite.js b/src/vegalite.js index b0ac263a2f..5a38874a9c 100644 --- a/src/vegalite.js +++ b/src/vegalite.js @@ -540,8 +540,9 @@ vl.axis.defs = function(names, enc) { function axis_def(name, enc){ var type = name, axis; - if(name==COL) type = "x"; - if(name==ROW) type = "y"; + var isCol = name==COL, isRow = name==ROW; + if(isCol) type = "x"; + if(isRow) type = "y"; var axis = { type: type, @@ -549,14 +550,14 @@ function axis_def(name, enc){ ticks: 3 //TODO(kanitw): better determine # of ticks }; - if(name==COL || name ==ROW){ + if(isRow || isCol){ axis.properties = { ticks: { opacity: {"value": 0} }, majorTicks: { opacity: {"value": 0} }, axis: { opacity: {"value": 0} } }; } - if(name==COL){ + if(isCol){ axis.offset = enc.config("yAxisMargin"); } diff --git a/test-output.html b/test-output.html index 502f4859d5..d007331b88 100644 --- a/test-output.html +++ b/test-output.html @@ -1,7 +1,7 @@ - Vegalite UI + Vegalite Test Output