From 5acee3d4b32ff6709edb1bb7a7143ccff89d1ea5 Mon Sep 17 00:00:00 2001 From: Chris Jean Date: Wed, 13 Oct 2010 14:59:42 -0500 Subject: [PATCH] Fixed chartHeight calculation to take horizontal bar charts into consideration. This fixes the issue where a narrow horizontal bar chart had crowded bottom labels. --- visualize.jQuery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/visualize.jQuery.js b/visualize.jQuery.js index 93313d8..519fe57 100644 --- a/visualize.jQuery.js +++ b/visualize.jQuery.js @@ -163,7 +163,7 @@ $.fn.visualize = function(options, container){ }, yLabels: function(){ var yLabels = []; - var chartHeight = o.height; + var chartHeight = ('bar' == o.type && 'horizontal' == o.barDirection) ? o.width : o.height; var numLabels = Math.round(chartHeight / 30); //var totalRange = this.topValue() + Math.abs(this.bottomValue()); var loopInterval = Math.round(this.totalYRange() / Math.floor(numLabels)); //fix provided from lab