Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed chartHeight calculation to take horizontal bar charts into cons…
…ideration. This fixes the issue where a narrow horizontal bar chart had crowded bottom labels.
  • Loading branch information
Chris Jean committed Oct 13, 2010
1 parent fc753ce commit 5acee3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion visualize.jQuery.js
Expand Up @@ -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
Expand Down

0 comments on commit 5acee3d

Please sign in to comment.