From 4978e076a99486dbb558a15bd161afbc6b113f3d Mon Sep 17 00:00:00 2001 From: Lieven Janssen Date: Sun, 15 Jul 2012 12:44:44 +0200 Subject: [PATCH] fixed auto-scaling on x and y-axis --- src/view.graph.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/view.graph.js b/src/view.graph.js index f810fd5d..1fd0c71c 100644 --- a/src/view.graph.js +++ b/src/view.graph.js @@ -169,10 +169,12 @@ my.Graph = Backbone.View.extend({ if (this.model.fields.get(this.state.get('group')).get('type') === 'date') { xaxis.mode = 'time'; xaxis.timeformat = '%y-%b'; - xaxis.autoscaleMargin = 2; + xaxis.autoscale = true; + xaxis.autoscaleMargin = 0.02; }; var yaxis = {}; - yaxis.autoscaleMargin = 2; + yaxis.autoscale = true; + yaxis.autoscaleMargin = 0.02; var mouse = {}; mouse.track = true;