From e2e740619bcb16c8a74fee48e2c1f770a99b4408 Mon Sep 17 00:00:00 2001 From: Brian Pilati Date: Sat, 18 Oct 2014 19:36:55 -0600 Subject: [PATCH] fixed a problem where the padding was being concatenated as a string --- src/angular-charts.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/angular-charts.js b/src/angular-charts.js index 6329794..290cbb2 100644 --- a/src/angular-charts.js +++ b/src/angular-charts.js @@ -268,7 +268,7 @@ angular.module('angularCharts').directive('acChart', function($templateCache, $c })); var padding = d3.max(yData) * 0.20; - y.domain([d3.min(yData), d3.max(yData) + padding]); + y.domain([d3.min(yData), (parseInt(d3.max(yData)) + parseInt(padding]))); x0.domain(d3.range(yMaxPoints)).rangeRoundBands([0, x.rangeBand()]); @@ -485,7 +485,7 @@ angular.module('angularCharts').directive('acChart', function($templateCache, $c var padding = d3.max(yData) * 0.20; - y.domain([d3.min(yData), d3.max(yData) + padding]); + y.domain([d3.min(yData), (parseInt(d3.max(yData)) + parseInt(padding]))); svg.append("g") .attr("class", "x axis") @@ -715,7 +715,7 @@ angular.module('angularCharts').directive('acChart', function($templateCache, $c var padding = d3.max(yData) * 0.20; - y.domain([d3.min(yData), d3.max(yData) + padding]); + y.domain([d3.min(yData), (parseInt(d3.max(yData)) + parseInt(padding]))); svg.append("g") .attr("class", "x axis") @@ -949,7 +949,7 @@ angular.module('angularCharts').directive('acChart', function($templateCache, $c var padding = d3.max(yData) * 0.20; - y.domain([d3.min(yData), d3.max(yData) + padding]); + y.domain([d3.min(yData), (parseInt(d3.max(yData)) + parseInt(padding]))); svg.append("g") .attr("class", "x axis") @@ -1185,4 +1185,4 @@ angular.module('angularCharts').directive('acChart', function($templateCache, $c acConfig: '=' } }; -}); \ No newline at end of file +});